def METHOD_NAME(*, db_session, project_id: int = None) -> List[Optional[CasePriority]]:
    """Returns all enabled case priorities."""
    if project_id:
        return (
            db_session.query(CasePriority)
            .filter(CasePriority.project_id == project_id)
            .filter(CasePriority.enabled == true())
        )
    return db_session.query(CasePriority).filter(CasePriority.enabled == true())