code: def off(  # pylint: disable=keyword-arg-before-vararg
              self, event: str = None, *handlers: T.Callable
      ) -> None:
          
  
          if not event:
              self._events.clear()
              return
  
          if event not in self._events:
              raise EventNotFound(event)
  
          if not handlers:
              self._events.pop(event)
              return
  
          for callback in handlers:
              if callback not in self._events[event]:
                  raise HandlerNotFound(event, callback)
              while callback in self._events[event]:
                  self._events[event].remove(callback)
          return
docs: Unregisters a whole event (if no handlers are given) or one
          or more handlers from an event.
          Raises EventNotFound when the given event isn't registered.
          Raises HandlerNotFound when a given handler isn't registered.