def pop_callback(obj):
    """Pop a single callback."""
    callbacks = obj._callbacks
    if not callbacks:
        return
    if isinstance(callbacks, Node):
        node = callbacks
        obj._callbacks = None
    else:
        node = callbacks.first
        callbacks.remove(node)
        if not callbacks:
            obj._callbacks = None
    return node.data, node.extra