<｜begin▁of▁sentence｜>### Instruction:
Given a synthetic network generated using the Erdős-Rényi model with 100 nodes and a connection probability of 0.1, how can the Leiden algorithm be applied to detect community structures within the network, and what does the resulting community partitioning look like?
### Response:
import networkx as nx
from graspologic.partition import leiden

# Create a synthetic graph
G = nx.erdos_renyi_graph(n=100, p=0.1)

# Perform community detection using the Leiden algorithm
partition = leiden(G)

# Print the community partitioning
print(partition)
<|EOT|>
