<｜begin▁of▁sentence｜>### Instruction:
Imagine you're monitoring a security network at a large facility, where the flow of access between different checkpoints is structured exactly like a directed graph. The checkpoints are represented as nodes, and the one-way paths connecting them indicate the allowed direction of movement. Now, in this surveillance network, you observe two specific routes: one starts at gate 0, progresses through gate 1 and gate 2, and ends at gate 3. There's also a secondary route beginning at gate 0, passing through gate 4, and converging at gate 3 as well.

Your job is to ascertain the initial common checkpoint for these two distinct passages – that is, the earliest point at which personnel traveling from gate 2 and gate 4 share the same preceding checkpoint in their access route within the facility. Identifying this point is crucial for streamlining security protocols and ensuring efficient emergency response.

Could you pinpoint that earliest shared gate within the network, without altering the semantics of the setup?
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph()

# Add paths
nx.add_path(G, (0, 1, 2, 3))
nx.add_path(G, (0, 4, 3))

# Compute the lowest common ancestor
lca = nx.lowest_common_ancestor(G, 2, 4)
print('The lowest common ancestor of nodes 2 and 4 is:', lca)
<|EOT|>
