<｜begin▁of▁sentence｜>### Instruction:
Given a graph whose edge set is [(1, 2), (1, 3), (2, 3), (3, 4), (4, 5), (5, 1)], can you compute the core number for each node using NetworkX?
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_edges_from([(1, 2), (1, 3), (2, 3), (3, 4), (4, 5), (5, 1)])

# Compute the core number for each vertex in the graph
core_nums = nx.core_number(G)

# Print the core numbers
print(core_nums)
<|EOT|>
