def replace_final_line(edited_lines):
    """Replace final line internal tutorial link with external links."""
    expected_final_line = (
        "For a more thorough introduction,"
        " check out the :ref:`tutorial`.\n"
    )
    new_final_line = (
        "You can find the complete documentation"
        "\nincluding a more thorough"
        " `tutorial <https://help.apteco.com/python/tutorial.html>`_"
        "\non the `Apteco website <https://help.apteco.com/python/index.html>`_."
    )

    final_line = edited_lines[-1]
    if final_line != expected_final_line:
        raise ValueError("Final line was different from expected.")
    edited_lines[-1] = new_final_line
    return edited_lines