def METHOD_NAME(model):
    model_type = type(model)
    if model_type not in MODEL_TO_OBJ:
        raise ValueError(f"{model_type.__name__} not a model")
    obj_type = MODEL_TO_OBJ[model_type]
    return obj_type(**model.data)