<｜begin▁of▁sentence｜>### Instruction:
Given the Astrophysics collaborations graph, which you can read from a GML file named 'astro-ph.gml', can you apply both Louvain and Leiden community detection algorithms using cdlib and then compute the Variation of Information to compare the two resulting node partitionings?
### Response:
import networkx as nx
from cdlib import algorithms, evaluation

# Create a graph from the Astrophysics collaborations dataset
G = nx.read_gml('astro-ph.gml')

# Applying community detection algorithms to the graph
louvain_communities = algorithms.louvain(G)
leiden_communities = algorithms.leiden(G)

# Evaluate the similarity of the two community structures using Variation of Information
voi = evaluation.variation_of_information(louvain_communities, leiden_communities)

print(voi.score)
<|EOT|>
