<｜begin▁of▁sentence｜>### Instruction:
Given a graph whose edge set with weights is [(0, 1, 5), (1, 2, 3), (2, 3, 1), (0, 3, 10)], compute the shortest path from node 0 to node 3 using the Bellman-Ford algorithm.
### Response:
import networkx as nx

# Create a weighted graph
G = nx.DiGraph()
G.add_weighted_edges_from([(0, 1, 5), (1, 2, 3), (2, 3, 1), (0, 3, 10)])

# Compute shortest paths from the source node 0 to all other nodes
path = nx.single_source_bellman_ford_path(G, 0, weight='weight')

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