def METHOD_NAME(session: Session, status: TaskStatuses) -> List[Task]:
    tasks = (
        session.query(Task)
        .where(
            Task.status == status,
        )
        .all()
    )
    return tasks