<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges (1, 2), (2, 3), (3, 4), can you check if this graph is a directed acyclic graph (DAG) using NetworkX?
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph()
G.add_edges_from([(1, 2), (2, 3), (3, 4)])

# Check if the graph is a directed acyclic graph (DAG)
is_dag = nx.is_directed_acyclic_graph(G)
print('The graph is a DAG:', is_dag)
<|EOT|>
