<｜begin▁of▁sentence｜>### Instruction:
Suppose in a small health clinic, we're conceptualizing the workflow network between four staff members, where the number of interactions (or tasks) each one is responsible for is represented by the sequence [1, 2, 2, 3]. As a medical assistant tasked with administrative oversight, could you demonstrate how we might utilize NetworkX to simulate a random graph that reflects this interaction structure? After establishing the network within NetworkX, would you also be able to confirm whether the interaction distribution among the staff aligns with our initial sequence? This will be instrumental in evaluating the balance of workload and ensuring efficient clinic operations.
### Response:
import networkx as nx

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

# Generate a random graph with the given degree sequence
G = nx.random_degree_sequence_graph(sequence, seed=42)

# Print the sorted degree of all nodes
print(sorted(d for n, d in G.degree()))
<|EOT|>
