<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph which you can read from graph_data.gml, can you use the igraph library to calculate the coreness of each vertex in the graph?
### Response:
from igraph import Graph

# Load the graph from a GML file
g = Graph.Read_GML('graph_data.gml')

# Calculate the coreness of each vertex
vertex_coreness = g.coreness(mode='all')

# Print the coreness for each vertex
for idx, coreness in enumerate(vertex_coreness):
    print(f'Vertex {idx} has coreness: {coreness}')
<|EOT|>
