def floyd_warshall(G, weight='weight'):
 return floyd_warshall_predecessor_and_distance(G, weight=weight)[1]

def floyd_warshall ( G , weight = 'weight' ) : return floyd_warshall_predecessor_and_distance ( G , weight = weight ) [ 1 ]
find all-pairs shortest path lengths using floyds algorithm .