def METHOD_NAME(result_index: list, index_file_path: Path):
    with open(index_file_path, "w", encoding="utf-8") as f:
        json.dump(
            sorted(result_index, key=lambda i: i["id"]), f, ensure_ascii=False, indent=4
        )