<｜begin▁of▁sentence｜>### Instruction:
Given a graph which you can load from a file (e.g., 'path_to_graph_file.gml'), can you compute the shortest path lengths between all pairs of vertices using the 'distances' function in igraph?
### Response:
from igraph import Graph

# Load a graph from file
g = Graph.Read('path_to_graph_file.gml')

# Compute the shortest path lengths from all vertices to all others
distances = g.distances()

# Print the distance matrix
for row in distances:
    print(row)
<|EOT|>
