<｜begin▁of▁sentence｜>### Instruction:
Given a graph generated by the Erdős-Rényi model with 10 nodes and edge probability of 0.5, and a partition of this graph into 3 communities: [{0, 1, 2, 3}, {4, 5, 6}, {7, 8, 9}], how can you use NetworkX to calculate the coverage and performance of this partition?
### Response:
import networkx as nx
from networkx.algorithms.community.quality import partition_quality

# Create a graph
G = nx.erdos_renyi_graph(10, 0.5)

# Define a partition of the graph into communities
partition = [{0, 1, 2, 3}, {4, 5, 6}, {7, 8, 9}]

# Calculate the quality of the partition
cov, perf = partition_quality(G, partition)

print('Coverage:', cov)
print('Performance:', perf)
<|EOT|>
