<｜begin▁of▁sentence｜>### Instruction:
Given the Les Miserables social network graph which can be read from a gml file named lesmis.gml, can you use both Louvain and Leiden community detection methods to find communities, and then compute the Adjusted Rand Index to assess the similarity between the community structures obtained by these methods? Notes: You need to print the Adjusted Rand Index score.
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Load the Les Miserables graph
G = nx.read_gml('lesmis.gml')

# Detect communities using the Louvain method
louvain_communities = algorithms.louvain(G)

# Detect communities using the Leiden method
leiden_communities = algorithms.leiden(G)

# Evaluate the similarity between the two community structures
ari = evaluation.adjusted_rand_index(louvain_communities, leiden_communities)
print(ari.score)
<|EOT|>
