<｜begin▁of▁sentence｜>### Instruction:
Given a UniqueIdGenerator instance, how can you verify if a particular item already has a unique ID assigned to it?
### Response:
from networkx.utils import UniqueIdGenerator

# Instantiate a UniqueIdGenerator object
uid_gen = UniqueIdGenerator()

# Generate unique ids
uid1 = uid_gen['item1']
uid2 = uid_gen['item2']

# Check if 'item1' has an ID
contains_item1 = 'item1' in uid_gen
print(f'Does uid_gen contain an ID for item1? {contains_item1}')

# Check if 'item3' has an ID
contains_item3 = 'item3' in uid_gen
print(f'Does uid_gen contain an ID for item3? {contains_item3}')
<|EOT|>
