<｜begin▁of▁sentence｜>### Instruction:
Given a set of nodes for a graph, how can you check if a particular node already has a unique ID assigned to it using the UniqueIdGenerator in NetworkX?
### Response:
from networkx.utils import UniqueIdGenerator

# Create a UniqueIdGenerator object
unique_id_gen = UniqueIdGenerator()

# Add a unique ID for 'node1'
id_node1 = unique_id_gen['node1']

# Check if 'node1' is already in the generator
print('node1' in unique_id_gen)

# Check if 'node2' is already in the generator
print('node2' in unique_id_gen)
<|EOT|>
