<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph with the edge set [(0,1),(1,2),(0,2),(2,3),(3,4)] and edge weights [1, 2, 1, 3, 4], can you use the get_shortest_path function in igraph to calculate and print the shortest path from vertex 0 to vertex 4, considering the weights?
### Response:
import igraph as ig

# Create a simple undirected graph with weighted edges
g = ig.Graph(edges=[(0,1),(1,2),(0,2),(2,3),(3,4)], directed=False)
g.es['weight'] = [1, 2, 1, 3, 4]

# Calculate the shortest path from vertex 0 to vertex 4
g_shortest_path = g.get_shortest_path(0, 4, weights='weight', output='vpath')
print(g_shortest_path)
<|EOT|>
