<｜begin▁of▁sentence｜>### Instruction:
Given the Network Science coauthorship graph which you can read from a GML file named netscience.gml, can you use the Louvain method in cdlib to perform community detection and compute the modularity density? Notes: You need to print the modularity density of the detected communities.
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Load the network science coauthorship graph
G = nx.read_gml('netscience.gml')

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

# Calculate the modularity density
mod_density = evaluation.modularity_density(G, communities)

# Print the modularity density result
print(mod_density)
<|EOT|>
