<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [(0, 1), (1, 2), (2, 3)], can you check if the graph is a DAG (directed acyclic graph) using the NetworkX function `nx.is_directed_acyclic_graph`?
### Response:
import networkx as nx

# Create a directed graph
dg = nx.DiGraph([(0, 1), (1, 2), (2, 3)])

# Add a cycle to demonstrate the check
# Uncomment the line below to add a cycle
dg.add_edge(3, 0)

# Check if the graph is a DAG
is_dag = nx.is_directed_acyclic_graph(dg)
print('Is the graph a DAG:', is_dag)
<|EOT|>
