<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edges [(0, 1), (0, 2), (1, 2), (2, 3), (3, 4)], can you use the incident function in igraph to find all the edges incident on vertex 2, including both incoming and outgoing edges?
### Response:
from igraph import Graph

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

# Get the edges incident on vertex 2
incident_edges = graph.incident(vertex=2, mode='all')

# Print the edges
print(incident_edges)
<|EOT|>
