code: def clear_callbacks(obj):
      
      callbacks = obj._callbacks
      if isinstance(callbacks, dllist):
          # Help the garbage collector by clearing all links.
          callbacks.clear()
      obj._callbacks = None
docs: Remove all callbacks from an object.