<｜begin▁of▁sentence｜>### Instruction:
Imagine you're crafting a detailed storyboard for your next informative video on transportation logistics, and you've decided to use a city's traffic network as your main thematic element. In this city, there are four critical checkpoints labeled 0, 1, 2, and 3. The roads that connect these checkpoints have varying levels of traffic which you've decided to represent with weights—in this case, travel times. The weighted connections are as follows: the route from checkpoint 0 to 1 has a travel time of 4.5 units, from 1 to 2 it's -1.2 units (indicating a possible shortcut or time-saving anomaly), from 2 to 3 takes 3.8 units, from 3 back to 0 is 5.1 units, and a direct route from 1 to 3 takes 2.6 units.

For your video, you wish to illustrate the most time-efficient path from every checkpoint to every other checkpoint within this network. How would you use NetworkX to model this city's network and calculate the shortest travel times for your narrative? This data visualization could provide a compelling storyline about navigating through the city in the most efficient way possible.
### Response:
import networkx as nx

# Initialize a weighted graph
G = nx.DiGraph()
G.add_weighted_edges_from([
    (0, 1, 4.5),
    (1, 2, -1.2),
    (2, 3, 3.8),
    (3, 0, 5.1),
    (1, 3, 2.6),
])

# Compute the shortest path lengths between all pairs
lengths = dict(nx.all_pairs_bellman_ford_path_length(G, weight='weight'))

# Print the shortest path lengths from node 1 to all other nodes
for target in lengths[1]:
    print(f'Length from node 1 to node {target} is {lengths[1][target]}')
<|EOT|>
