<｜begin▁of▁sentence｜>### Instruction:
Given a graph with nodes [1, 2, 3] and edges [(1, 2)], how many isolates are there in the graph, where an isolate is defined as a node with no connections to other nodes?
### Response:
import networkx as nx

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

# Count the number of isolates
n_isolates = nx.number_of_isolates(G)
print('Number of isolates:', n_isolates)
<|EOT|>
