<｜begin▁of▁sentence｜>### Instruction:
Given the Power grid Graph which you can read from a GML file named power.gml, can you use both the Louvain and Leiden community detection functions in cdlib to perform community detection on this graph, and then compute the Adjusted Mutual Information between the two resulting partitions? Please print the AMI score at the end.
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

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

# Performing community detection using the Louvain method
louvain_communities = algorithms.louvain(G)

# Performing community detection using the Leiden method
leiden_communities = algorithms.leiden(G)

# Computing Adjusted Mutual Information (AMI) between the two partitions
ami = evaluation.adjusted_mutual_information(louvain_communities, leiden_communities)

# Printing the AMI score
print('Adjusted Mutual Information: ', ami.score)
<|EOT|>
