def METHOD_NAME(
    *, db_session, project_id: int, case_severity_in=CaseSeverityRead
) -> CaseSeverity:
    """Returns the case severity specified or raises ValidationError."""
    case_severity = get_by_name(
        db_session=db_session, project_id=project_id, name=case_severity_in.name
    )
    if not case_severity:
        raise ValidationError(
            [
                ErrorWrapper(
                    NotFoundError(
                        msg="Case severity not found.",
                        case_severity=case_severity_in.name,
                    ),
                    loc="case_severity",
                )
            ],
            model=CaseSeverityRead,
        )
    return case_severity