<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edge set [(0, 1), (0, 2), (1, 2), (1, 3), (3, 4), (4, 5), (4, 6), (5, 6), (2, 7), (7, 8)], can you use the k_core function in igraph to determine the k-cores of the graph for k-values of 2 and 3?
### Response:
import igraph as ig

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

# Get k-cores of the graph for k=2 and k=3
k2_core = g.k_core(2)
k3_core = g.k_core(3)

# Print the original graph's summary
g.summary()
# Print summary of k-core with k=2
k2_core.summary()
# Print summary of k-core with k=3
k3_core.summary()
<|EOT|>
