code: def remove_callback(self, callback, msg_type=None):
          
          if msg_type is None:
              msg_type = self._callbacks.keys()
          cb_keys = self._to_iter(msg_type)
          if cb_keys is not None:
              for msg_type_ in cb_keys:
                  try:
                      self._callbacks[msg_type_].remove(callback)
                  except KeyError:
                      pass
          else:
              self._callbacks[msg_type].remove(callback)
docs: Remove per message type of global callback.
  
          Parameters
          ----------
          callback : fn
            Callback function
          msg_type : int | iterable
            Message type to remove callback from. Default `None` means global callback.
            Iterable type removes the callback from all the message types.