code: def synchronize_results(self):
      # 同步所有进程中的数据
      eval_ids, eval_results = merge(self.obj_ids, self.results)
      self.aggregation_results = {
          "obj_ids": eval_ids,
          "results": eval_results,
      }
  
      # 主进程上保存即可
      if is_main_process():
          # results = []
          # [results.extend(i) for i in eval_results]
          # write predict results into json file
          json_str = json.dumps(eval_results, indent=4)
          with open(self.results_file_name, "w") as json_file:
              json_file.write(json_str)
  
file_path: deep-learning-for-image-processing/pytorch_keypoint/HRNet/train_utils/coco_eval.py
imports: import json
  import copy
  from PIL import Image, ImageDraw
  import numpy
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  from .distributed_utils import all_gather, is_main_process
  from transforms import affine_points
label_desc: Use image node_id 5 for calling the EvalCOCOMetric obj's underlying member method code with example usage: obj.synchronize_results() without return types