<｜begin▁of▁sentence｜>### Instruction:
Given a graph with nodes labeled 1 and 2, and a single directed edge from node 1 to node 2, determine if the graph is directed using the is_directed function from the NetworkX library.
### Response:
import networkx as nx

# Create a graph
G = nx.DiGraph()

# Add nodes
G.add_node(1)
G.add_node(2)

# Add a directed edge
G.add_edge(1, 2)

# Check if the graph is directed
is_directed = nx.is_directed(G)
print('Is the graph directed:', is_directed)
<|EOT|>
