<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edge set [('A', 'B'), ('C', 'A')], how can you determine if the graph is directed or undirected using NetworkX?
### Response:
import networkx as nx

# Create a directed graph
DG = nx.DiGraph()
DG.add_edge('A', 'B')
DG.add_edge('C', 'A')

# Check if the graph is directed
is_directed_graph = DG.is_directed()
print('Is the graph directed?', is_directed_graph)

# Create an undirected graph
UG = nx.Graph()
UG.add_edge('A', 'B')
UG.add_edge('C', 'A')

# Check if the graph is directed
is_directed_graph = UG.is_directed()
print('Is the graph directed?', is_directed_graph)
<|EOT|>
