<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edge set [(1, 2), (1, 3), (2, 5), (3, 4), (4, 5)], how can you compute the dominance frontiers for each node starting from node 1 using NetworkX?
### Response:
import networkx as nx

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

# Compute dominance frontiers
dominance = nx.dominance_frontiers(G, 1)
print(sorted((u, sorted(df)) for u, df in dominance.items()))
<|EOT|>
