<｜begin▁of▁sentence｜>### Instruction:
I have two degree sequences for a directed graph: the in-degree sequence is [2, 2, 0] and the out-degree sequence is [0, 2, 2]. Can you create a directed graph using the directed_havel_hakimi_graph function from NetworkX and visualize it?
### Response:
import networkx as nx

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

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

# Draw the graph using Matplotlib
import matplotlib.pyplot as plt
nx.draw(G, with_labels=True)
plt.show()
<|EOT|>
