<｜begin▁of▁sentence｜>### Instruction:
Given in-degree sequence [2, 2, 2, 1, 1] and out-degree sequence [2, 2, 1, 2, 1], can you generate a directed graph using the Havel-Hakimi algorithm with NetworkX? What are the edges of the generated graph?
### Response:
import networkx as nx

# Define the in-degree and out-degree sequences
in_deg_sequence = [2, 2, 2, 1, 1]
out_deg_sequence = [2, 2, 1, 2, 1]

# Create a directed graph using the directed Havel-Hakimi algorithm
digraph = nx.directed_havel_hakimi_graph(in_deg_sequence, out_deg_sequence)

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