<｜begin▁of▁sentence｜>### Instruction:
Given the High-energy theory collaborations Graph which you can read from a gml file named hep-th.gml, can you use Louvain and Leiden functions in cdlib to perform community detection? And can you compute the Normalized Mutual Information (NMI) to evaluate the similarity between the two partitions obtained from those algorithms?
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Create a graph
G = nx.read_gml('hep-th.gml')

# Apply the Louvain community detection algorithm
louvain_communities = algorithms.louvain(G)

# Apply the Leiden community detection algorithm
leiden_communities = algorithms.leiden(G)

# Compute the Normalized Mutual Information between the two partitions
nmi_score = evaluation.normalized_mutual_information(louvain_communities, leiden_communities)

print(nmi_score)
<|EOT|>
