<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edges (0, 1), (1, 2), (2, 3), (3, 0) and some attributes added to its nodes and edges, can you use the write_graphml function in igraph to save this graph to a GraphML file?
### Response:
from igraph import Graph

# Create a simple graph
g = Graph(edges=[(0, 1), (1, 2), (2, 3), (3, 0)])

# Add some attributes to the nodes and edges
for vertex in g.vs:
    vertex['label'] = f'Node {vertex.index}'
for edge in g.es:
    edge['weight'] = edge.index

# Write the graph to a GraphML file
g.write_graphml('my_graph.graphml')
<|EOT|>
