<｜begin▁of▁sentence｜>### Instruction:
Given the Les Miserables Graph which you can read from a gml file named lesmis.gml, can you use the Louvain method in cdlib to perform community detection? And can you compute the fraction of community nodes that belong to a triad (triangle participation ratio)?

Notes: You need to print the fraction of community nodes that participate in at least one triad.
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

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

# Perform community detection
communities = algorithms.louvain(G)

# Evaluate triangle participation ratio
triangle_ratio = evaluation.triangle_participation_ratio(G, communities)

# Print the result
print(triangle_ratio)
<|EOT|>
