

@classmethod
def _lookup_model(cls, kind, default_model=None):
    "Get the model class for the kind.\n\n    Args:\n      kind: A string representing the name of the kind to lookup.\n      default_model: The model class to use if the kind can't be found.\n\n    Returns:\n      The model class for the requested kind.\n    Raises:\n      KindError: The kind was not found and no default_model was provided.\n    "
    modelclass = cls._kind_map.get(kind, default_model)
    if (modelclass is None):
        raise KindError(("No model class found for kind '%s'. Did you forget to import it?" % kind))
    return modelclass

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Model._lookup_model/original