docs: def create_model_resource(resource_map, name, app=Injected):
      """Create a model resource from a dict ``resource_map``
      {'resource name': ('model package', 'model class')}
  
      :param resource_map: dict with resource descriptions
      :type resource_map: dict(str, tuple(str))
      :param name: name of the concrete resource
      :param app: current application, injected
      :type app: Zsl
      :return: instantiated model resource
      """
      try:
          resource_description = resource_map[name]
          if len(resource_description) == 2:
              module_name, model_name = resource_map[name]
              resource_class = ModelResource
          elif len(resource_description) == 3:
              module_name, model_name, resource_class = resource_map[name]
          else:
              raise ImportError("Invalid resource description for resource '{0}'".format(name))
      except KeyError:
          raise ImportError("Missing resource description for resource '{0}'".format(name))
  
      module = importlib.import_module(module_name)
      model_cls = getattr(module, model_name)
  
      return app.injector.create_object(resource_class, {'model_cls': model_cls})