<｜begin▁of▁sentence｜>### Instruction:
As an Air Quality Specialist, you may need to analyze the network of air quality monitoring stations to understand how they are interconnected and how pollutants may flow through the network. One way to do this is by using networkx to calculate the triad census, which quantifies how many of each type of interconnected monitoring station patterns are present in the network. This can provide valuable insights into the potential spread of pollutants and help in making decisions to protect public health and the environment.
### Response:
from igraph import Graph

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

# Calculate the triad census
triad_census = g.triad_census()

# Print the triad census
print(triad_census)
<|EOT|>
