def METHOD_NAME(obj, infra=None):
    obj_type = type(obj)
    if obj_type not in OBJ_TO_MODEL:
        raise ValueError(f"{obj_type.__name__} not a obj")
    model_type = OBJ_TO_MODEL[obj_type]
    data = obj.dict()
    obj_id = data["id"]
    return model_type(obj_id=obj_id, data=data, infra=infra)