<｜begin▁of▁sentence｜>### Instruction:
As an industrial engineer, imagine we are analyzing a production network where each node represents a department and the degree sequence [4, 3, 3, 3, 2] indicates the number of direct exchanges each department has with others in the workflow. We aim to optimize our understanding of this system by constructing a graphical representation. Could we leverage NetworkX to model this scenario employing the Havel-Hakimi algorithm, ensuring the graph is simple, with our given degree sequence to streamline the operational connectivity?
### Response:
import networkx as nx

# Given degree sequence
deg_sequence = [4, 3, 3, 3, 2]

try:
    # Create a graph using the Havel-Hakimi algorithm
    H = nx.havel_hakimi_graph(deg_sequence)
    print('Graph edges:', list(H.edges()))
except nx.NetworkXException as e:
    print('Error:', e)
<|EOT|>
