def METHOD_NAME(tmp_path, final_path, mode='a'):
    """
    Append the contents of tmp_path to final_path and remove tmp_path.
    """
    if 'b' in mode:
        tmp_mode = 'rb'
    else:
        tmp_mode = 'r'
    with _open(str(final_path), mode=mode) as final_file, _open(tmp_path, mode=tmp_mode) as tmp_file:
        final_file.write(tmp_file.read())
    os.remove(tmp_path)