<｜begin▁of▁sentence｜>### Instruction:
Given the Political blogs Graph which you can read from a gml file named 'polblogs.gml', can you use the Louvain method in cdlib to perform community detection? And can you compute the number of edges per community node that point outside the cluster, which is known as the expansion score?
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Creating a sample graph
G = nx.read_gml('polblogs.gml')

# Applying Louvain Method for community detection
communities = algorithms.louvain(G)

# Calculate the expansion (number of edges per community node that point outside the cluster)
expansion_score = evaluation.expansion(G, communities)

print(expansion_score)
<|EOT|>
