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