def is_sentinel(obj):
 return ((type(obj) is str) and (obj == SENTINEL))

def is_sentinel ( obj ) : return ( ( type ( obj ) is str ) and ( obj == SENTINEL ) )
predicate to determine whether an item from the queue is the signal to stop .