<｜begin▁of▁sentence｜>### Instruction:
As a knowledgeable networkx assistant, I can certainly help! Let's say you are a makeup artist preparing for a major event. You have a lineup of models (vertices) and you need to calculate the distances from the dressing room (selected vertex) to each of the models using networking skills similar to how you would use the Vertex.distances function in igraph. This will help you efficiently plan the makeup schedule for each model.
### Response:
from igraph import Graph, Vertex

# Create an example graph
g = Graph(edges=[(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)])

# Select a vertex using its index
g.vs[2]["label"] = 'Vertex 2'
v = Vertex(g, 2)

# Get distances from selected vertex to all other vertices
vertex_distances = v.distances()
print(vertex_distances)
<|EOT|>
