<｜begin▁of▁sentence｜>### Instruction:
Given a weighted directed graph with vertex set {0, 1, 2, 3, 4} and edge set with weights [(0, 1, 1), (1, 2, 2), (2, 3, 3), (3, 4, 4), (4, 0, 5)], how can you use the igraph Vertex strength method to calculate the strength of vertex 2 considering the weights?
### Response:
import igraph as ig

# Create a directed graph with weights
g = ig.Graph(directed=True)
g.add_vertices(5)
g.add_edges([(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)])
g.es['weight'] = [1, 2, 3, 4, 5] 

# Get the strength of vertex 2 with weights
g.vs[2].strength(weights=g.es['weight'])
<|EOT|>
