<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [(0, 1), (1, 0), (1, 2), (2, 1)], can you convert it to an undirected graph, ensuring that multiple directed edges between the same vertex pair are collapsed into a single edge?
### Response:
from igraph import Graph

# Create a directed graph with multiple edges
edges = [(0, 1), (1, 0), (1, 2), (2, 1)]
g = Graph(edges=edges, directed=True)

# Convert the directed graph to an undirected graph, combining multiple edges
undirected_g = g.to_undirected(mode='collapse')

# Print information about the undirected graph
print(undirected_g)
<|EOT|>
