<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph with edge set [(1, 2), (2, 3), (2, 4), (3, 5), (4, 5)], how can you use NetworkX to construct and represent its junction tree?
### Response:
import networkx as nx

# Create an undirected graph
G = nx.Graph()

# Add edges forming a simple structure
G.add_edges_from([(1, 2), (2, 3), (2, 4), (3, 5), (4, 5)])

# Compute the junction tree of the graph
junction_tree_graph = nx.junction_tree(G)

print('Nodes:', junction_tree_graph.nodes())
print('Edges:', junction_tree_graph.edges())
<|EOT|>
