<｜begin▁of▁sentence｜>### Instruction:
Given a complete graph with 5 nodes, where all edges have a weight of 1 except for the edges connecting consecutive nodes (e.g., edge (0, 1), (1, 2), (2, 3), (3, 4), (4, 0)), each having a weight of 2, compute a 3/2-approximation of the traveling salesman problem using the Christofides algorithm provided by NetworkX.
### Response:
import networkx as nx
from networkx.algorithms import approximation as approx

# Create a complete weighted undirected graph
G = nx.complete_graph(5)
nx.set_edge_attributes(G, values=1, name='weight')
G.edges[0, 1]['weight'] = 2
G.edges[1, 2]['weight'] = 2
G.edges[2, 3]['weight'] = 2
G.edges[3, 4]['weight'] = 2
G.edges[4, 0]['weight'] = 2

# Use the Christofides algorithm to approximate TSP cycle
cycle = approx.christofides(G, weight='weight')

print(cycle)
<|EOT|>
