<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph with edges defined as [(0, 1), (1, 2), (2, 3), (3, 4), (4, 0), (5, 6)], how can you determine the subcomponent (i.e., all vertices in the same connected component) for the vertex with index 2?
### Response:
from igraph import Graph

# Create a sample undirected graph
g = Graph(edges=[(0, 1), (1, 2), (2, 3), (3, 4), (4, 0), (5, 6)])

# Determine the subcomponent for the vertex with index 2
g_subcomponent = g.subcomponent(2, mode='ALL')

# Output the vertices in the same component as vertex 2
print(g_subcomponent)
<|EOT|>
