<｜begin▁of▁sentence｜>### Instruction:
Given a directed acyclic graph with edge set [(1, 2), (2, 3), (2, 4)], use NetworkX to generate all possible topological sort orders for the graph.
### Response:
import networkx as nx

# Creating a directed acyclic graph (DAG)
DG = nx.DiGraph([(1, 2), (2, 3), (2, 4)])

# Generating all topological sorts of the DAG
all_sorts = list(nx.all_topological_sorts(DG))

# Output all topological sorts
for sort in all_sorts:
    print(sort)
<|EOT|>
