<｜begin▁of▁sentence｜>### Instruction:
Given a weighted graph G, with nodes and edges defined, if you have already computed the Floyd-Warshall predecessor and distance matrices for this graph, how would you use the 'reconstruct_path' function to find the shortest path from a source node to a target node?
### Response:
import networkx as nx

# Compute the Floyd-Warshall predecessor and distance
pred, dist = nx.floyd_warshall_predecessor_and_distance(G)

# Reconstruct the shortest path from source to target
path = nx.reconstruct_path(source, target, pred)

print(path)
<|EOT|>
