<｜begin▁of▁sentence｜>### Instruction:
Given an undirected graph with edges [(1, 2), (2, 3), (3, 4), (4, 5), (1, 5)], can you calculate the diameter of the graph using NetworkX?
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3), (3, 4), (4, 5), (1, 5)])

# Compute the diameter of the graph
diameter = nx.diameter(G)

# Print the diameter
print('Diameter of the graph:', diameter)
<|EOT|>
