<｜begin▁of▁sentence｜>### Instruction:
Given a directed igraph graph object with the edge set [(0, 1), (1, 2), (2, 3), (3, 0)] and a weight attribute for each edge with values [1, 2, 3, 4], how can you retrieve the weight values for all edges using get_attribute_values?
### Response:
import igraph as ig

# Create a graph with multiple edges and an attribute
edges = [(0, 1), (1, 2), (2, 3), (3, 0)]
weights = [1, 2, 3, 4]
g = ig.Graph(edges=edges, directed=True)
g.es['weight'] = weights

# Retrieve the weights for all edges
edge_weights = g.es.get_attribute_values('weight')
print(edge_weights)
<|EOT|>
