<｜begin▁of▁sentence｜>### Instruction:
Given a graph which you can read from network.gml, can you use community_leading_eigenvector function in igraph to detect the community structure using the eigenvectors of matrices and print the membership vector of the clustering?
### Response:
from igraph import Graph
import igraph as ig

g = ig.read('network.gml')

# Detecting community structure using leading eigenvector
communities = g.community_leading_eigenvector()

# Getting membership vector of the clustering
membership_vector = communities.membership

print(membership_vector)
<|EOT|>
