<｜begin▁of▁sentence｜>### Instruction:
Given the Power grid Graph which you can read from a gml file named power.gml, can you use the Louvain method in cdlib to perform community detection? And can you compute the average distance within communities?

Notes: You need to print the average distance within communities.
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Load the power grid graph
G = nx.read_gml('power.gml')

# Community detection using the Louvain method
communities = algorithms.louvain(G)

# Compute the average distance within communities
avg_dist = evaluation.avg_distance(G, communities)

print(f'Average distance in the community/partition: {avg_dist}')
<|EOT|>
