<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edge set [(0, 1), (1, 2), (2, 3), (3, 4)], can you use the get_shortest_paths function in igraph to calculate the shortest path from vertex 0 to vertex 4?
### Response:
from igraph import Graph

# Create a graph with given edges
g = Graph(edges=[(0, 1), (1, 2), (2, 3), (3, 4)])

# Get the shortest path from vertex 0 to vertex 4
shortest_path = g.get_shortest_paths(0, to=4, output='vpath')

# Print the shortest path
for path in shortest_path:
    print(' -> '.join(map(str, path)))
<|EOT|>
