code: def disconnect(self, event, cb):
          
          try:
              self._callbacks[event].remove(cb)
          except KeyError:
              raise ValueError("{!r} is not a valid cursor event".format(event))
          except ValueError:
              raise ValueError("Callback {} is not registered".format(event))
docs: Disconnect a previously connected callback.
  
          If a callback is connected multiple times, only one connection is
          removed.