<｜begin▁of▁sentence｜>### Instruction:
Imagine we're overseeing a network infrastructure project where we aim to simulate a connection map with a specified distribution of link counts for each node. Our target connectivity pattern for five different nodes is delineated by the following sequence: [3, 2, 2, 1, 2]. How might we leverage NetworkX's configuration model to engineer a stochastic yet representative graph that embodies this connection profile? This graph would serve as a theoretical model for further analysis and development within our project's framework.
### Response:
import networkx as nx
from networkx.utils import random_sequence

# Define the degree sequence
degree_sequence = [3, 2, 2, 1, 2]

# Create a graph using the configuration model
G = nx.configuration_model(degree_sequence)

# Convert to a simple graph (remove parallel edges and self loops)
H = nx.Graph(G)
H.remove_edges_from(nx.selfloop_edges(H))

# Print the edges of the resulting graph
print(list(H.edges()))
<|EOT|>
