G = Graph({1:{2:10,3:17}, 2:{4:3,3:6},3:{4:2}}, sparse=True)
G.plot(edge_labels=True).show() 
G.shortest_paths(1, by_weight=True)