def METHOD_NAME(
    doc: DocInfo,
    task: str,
    reviewable: int,
    old_reviewers: list[int],
    new_reviewers: list[int],
) -> None:
    """Change reviewers in one task.
    :param doc: Document containing reviewable answers.
    :param task: task name.
    :param reviewable: User ID for the review target user.
    :param old_reviewers: List of old reviewers IDs
    :param new_reviewers: List of new reviewers IDs
    """
    # TODO: Clean up; don't do one query per loop: instead fetch all users at once!
    for i in range(0, len(new_reviewers)):
        updated_user = PeerReview.query.filter_by(
            block_id=doc.id,
            reviewer_id=old_reviewers[i],
            reviewable_id=reviewable,
            task_name=task,
        ).first()
        updated_user.reviewer_id = new_reviewers[i]
    try:
        db.session.flush()
    except IntegrityError:
        db.session.rollback()
        raise RouteException("Error: Same reviewer more than once in one task")
    # Note: Don't commit here because the function is used in other functions that update the DB