<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph whose edge set is [(1, 2), (1, 3), (2, 3), (3, 1), (5, 6), (5, 4), (6, 7)], how can you obtain a random triad (order-3 subgraph) using NetworkX with a fixed seed for reproducibility?
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph()
# Add edges to the graph
G.add_edges_from([(1, 2), (1, 3), (2, 3), (3, 1), (5, 6), (5, 4), (6, 7)])

# Generate a random triad from the graph
triad = nx.random_triad(G, seed=1)

# Print the edges of the triad
print(triad.edges())
<|EOT|>
