<｜begin▁of▁sentence｜>### Instruction:
Given a graph loaded from a file named 'graph_network.gml', how can you obtain and print the weights associated with each edge, assuming the weights are stored as an edge attribute named 'weight'?
### Response:
import igraph as ig

# Load the graph from the Graph Modeling Language (GML) file
g = ig.read('graph_network.gml')

# Get the values of the edge attribute called 'weight'
weights = g.es.get_attribute_values('weight')

# Print edge weights
for edge, weight in zip(g.es, weights):
    print(f'Edge {edge.index} weight: {weight}')
<|EOT|>
