<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [(1, 2), (2, 3), (3, 4)], what are the edges of its transitive closure without including self-loops for trivial (length 0) cycles?
### Response:
import networkx as nx

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

# Compute the transitive closure of the graph
TC = nx.transitive_closure(DG, reflexive=False)

# Print the edges of the transitive closure
print(TC.edges())
<|EOT|>
