<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [(0, 1), (1, 2), (2, 0)], how can you use the TriadCensus function from the NetworkX library to count all possible triads (subgraphs of three nodes) and categorize them by their structure?
### Response:
import networkx as nx

# Create a directed graph
g = nx.DiGraph()
g.add_edges_from([(0, 1), (1, 2), (2, 0)])

# Compute the triad census
triad_census = nx.triad_census(g)

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