<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph, how can you calculate the global transitivity (clustering coefficient) using igraph, which is the probability that two neighbors of a vertex are connected?
### Response:
from igraph import Graph

# Create an undirected graph with some edges
g = Graph(edges=[(0, 1), (1, 2), (0, 2), (3, 4)])

# Calculate the global transitivity (clustering coefficient)
transitivity = g.transitivity_undirected()

print('Transitivity:', transitivity)
<|EOT|>
