def METHOD_NAME(session: Session, task_id: id, status: TaskStatuses) -> None:
    if status not in TaskStatuses.__members__.values():
        raise ValueError(f"{status} is not available")
    upd = update(Task).where(Task.id == task_id).values(status=status)
    session.execute(upd)