code: def has_callback(obj, handle):
      
      callbacks = obj._callbacks
      if not callbacks:
          return False
      if isinstance(callbacks, Node):
          return handle is callbacks
      else:
          return handle in callbacks
docs: Return whether a callback is currently registered for an object.