<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [(0, 1), (1, 2), (2, 3), (3, 4)], can you compute the shortest path from node 0 to node 4 using the NetworkX shortest_path function?
### Response:
import networkx as nx

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

# Find the shortest path from node 0 to node 4
path = nx.shortest_path(G, source=0, target=4)
print('Shortest path from 0 to 4:', path)
<|EOT|>
