code: def get_handlers(self, kind=None):
          
          with self._lock:
              if kind is not None:
                  try:
                      return self._handlers[kind][:]
                  except KeyError:
                      return []
  
              return self.__all_handlers.copy()
docs: Retrieves the handlers of the given kind. If kind is None, all handlers
          are returned.
  
          :param kind: The kind of the handlers to return
          :return: A list of handlers, or an empty list