def METHOD_NAME(*, db_session, project_id, service_in=ServiceRead) -> ServiceRead:
    """Returns the service specified or raises ValidationError."""
    source = get_by_name(db_session=db_session, project_id=project_id, name=service_in.name)
    if not source:
        raise ValidationError(
            [
                ErrorWrapper(
                    NotFoundError(
                        msg="Service not found.",
                        source=service_in.name,
                    ),
                    loc="service",
                )
            ],
            model=ServiceRead,
        )
    return source