<｜begin▁of▁sentence｜>### Instruction:
As the IT Project Manager for our team, we've been assigned to create a network optimization tool. Our current phase of the project involves analyzing the efficiency of network pathways within a given data structure. We have a network graph represented by nodes and weighted edges, encapsulated in the following data set: edges - [(0, 1, 3), (1, 2, 2), (1, 3, 4), (2, 4, 1), (3, 4, 1)].

Our task now is to leverage the NetworkX library to process this graph and determine the most efficient path between all node pairs. Specifically, I need you to focus on the processing component that will ascertain the most direct path from node 0 to node 4 within our network graph.

For your reference, the weight on each edge represents the cost of traversal between the connected nodes, and our goal is to minimize this cost as we navigate from the start node to the destination node. Please integrate this feature into the network analysis module and ensure it aligns with the overall project's objectives of optimizing network pathways.
### Response:
import networkx as nx

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

# Compute shortest paths between all nodes
paths = dict(nx.all_pairs_dijkstra_path(G))
print(paths[0][4])  # Example: Get the shortest path from node 0 to 4
<|EOT|>
