<｜begin▁of▁sentence｜>### Instruction:
In the context of ensuring optimal routing for a network of pathways in an industrial facility, consider a scenario where we have a series of interconnected passageways with varying lengths. These connections can be represented by a diagram with pathways connecting different stations: A (0) to B (1) has a distance of 2 units, B (1) to C (2) with 1 unit, C (2) to D (3) also 1 unit, and finally D (3) to E (4) with another 1 unit of length.

Given this setup, we need to ascertain the most efficient route from station A (Node 0) to all other stations, ensuring the safety and well-being of the workers by minimizing their travel time. Specifically, it's crucial to determine the most time-effective path for workers traveling directly from station A to station E (Node 4). Could you utilize the NetworkX tool to analyze and provide the shortest path from station A to each station in the network, including the precise route to reach station E?
### Response:
import networkx as nx

# Create a weighted graph
G = nx.Graph()
G.add_weighted_edges_from([(0, 1, {'weight': 2}), (1, 2, {'weight': 1}), (2, 3, {'weight': 1}), (3, 4, {'weight': 1})])

# Specify the source node
source = 0

# Find the shortest paths from source to all other nodes
paths = nx.single_source_dijkstra_path(G, source)

# Output the shortest path to node 4
print(paths[4])
<|EOT|>
