code: def getFunc(self, o: Any) -> Callable:
          
          for cls, func in self.routes.items():
              if isinstance(o, cls):
                  return func
          logger.error("Unhandled msg {}, available handlers are:".format(o))
          for cls in self.routes.keys():
              logger.error("   {}".format(cls))
          raise RuntimeError("unhandled msg: {}".format(o))
docs: Get the next function from the list of routes that is capable of
          processing o's type.
  
          :param o: the object to process
          :return: the next function