def get_model_handler(self, model_name, method_name, failure_code=404):

        # see if namespace was specified, e.g. "<ns>.<model_name>"
        ns_model_name = model_name.rpartition(".")
        if(ns_model_name[0]):
            # only set namespace if callers are allowed to
            if WRITE_EXT_NS not in self.external_namespaces:
                raise DispatcherException(404)
            namespace_manager.set_namespace(ns_model_name[0])
            # remove namespace from model name
            model_name = ns_model_name[2]

        try:
            model_handler = self.model_handlers[model_name]
        except KeyError:
            logging.error("invalid model name %s", model_name, exc_info=1)
            raise DispatcherException(failure_code)

        if method_name not in model_handler.model_methods:
            raise DispatcherException(405)

        return model_handler
Returns the ModelHandler with the given name, or None (and sets
dataset/ETHPy150Open jahlborn/appengine-rest-server/src/main/python/rest/__init__.py/Dispatcher.get_model_handler