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