<｜begin▁of▁sentence｜>### Instruction:
Given a graph with an edge set of [(1, 2), (1, 3), (1, 4), (2, 3), (3, 4)], can you compute the node connectivity between all pairs of nodes using the all_pairs_node_connectivity function from the NetworkX library?
### Response:
import networkx as nx

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

# Compute node connectivity between all pairs of nodes
connectivity_pairs = nx.all_pairs_node_connectivity(G)

# Convert to a dictionary
connectivity_dict = {frozenset({node1, node2}): value for (node1, value) in connectivity_pairs for node2 in value}

print(connectivity_dict)
<|EOT|>
