<｜begin▁of▁sentence｜>### Instruction:
As an insurance agent, when evaluating and comparing different insurance policies from different providers, you want to ensure that you have a clear understanding of their benefits and coverage. In the same way, when working with LFR benchmark graphs, you may want to evaluate and compare different community detection algorithms, such as Louvain and Label Propagation, by analyzing their Normalized Mutual Information scores across multiple runs. Just as you would compare the benefits and coverage of insurance policies, you can use this comparison to determine which algorithm performs best in identifying the communities within the graphs.
### Response:
import networkx as nx
from cdlib import algorithms, viz, evaluation

# Generate two synthetic LFR benchmark graphs
g1 = nx.algorithms.community.LFR_benchmark_graph(1000, 3, 1.5, 0.5, min_community=20, average_degree=5)
g2 = nx.algorithms.community.LFR_benchmark_graph(1000, 3, 1.5, 0.7, min_community=20, average_degree=5)

# List to store the graphs
graphs = [g1, g2]
graph_names = ['LFR1', 'LFR2']

# List to store the reference clusterings
eferences = []
for g in graphs:
    references.append(NodeClustering(communities={frozenset(g.nodes[v]['community']) for v in g}, graph=g, method_name='reference'))

# List of algorithms for community detection
algos = [algorithms.louvain, algorithms.label_propagation]

# Plot scoring
viz.plot_scoring(graphs, references, graph_names, algos, scoring=evaluation.normalized_mutual_information, nbRuns=2)
<|EOT|>
