<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edge set [(1, 2), (2, 3), (1, 3), (3, 4)], how can you compute the trophic differences of the edges using NetworkX?
### Response:
import networkx as nx
from networkx.algorithms.trophic import trophic_differences

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

# Compute the trophic differences
diffs = trophic_differences(G)
print(diffs)
<|EOT|>
