networkx.shortest_path
networkx.bidirectional_shortest_path
Return the shortest path length the source and target.
Raise an exception if no path exists.
G is treated as an unweighted graph. For weighted graphs see dijkstra_path_length.