网址 https://testfixsphinx.readthedocs.io/en/latest/reference/generated/networkx.algorithms.community.community_generators.LFR_benchmark_graph.html
该网址为networkx中LFR_benchmark_graph的介绍,其中事例代码中导入LFR_benchmark_graph时 ,将generators写为algorithms
原文为
from networkx.algorithms.community import LFR_benchmark_graph
应改为
from networkx.generators.community import LFR_benchmark_graph
该函数在networkx在的2.4版本中才有