<｜begin▁of▁sentence｜>### Instruction:
Given a graph whose edge set is [(1, 2), (1, 3), (2, 3), (2, 4), (3, 4)], can you compute the closeness centrality for each node using NetworkX?
### Response:
import networkx as nx

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

# Compute the closeness centrality for the nodes
centrality = nx.closeness_centrality(G)

print('Closeness centrality:', centrality)
<|EOT|>
