code: def pop_callback(obj):
      
      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
docs: Pop a single callback.