networkx.center
networkx.shortest_path_length
Return a list of nodes in a shortest path between source and target.
There may be more than one shortest path. This returns only one.