code: def save_info(coco_evaluator, save_name: str = "record_mAP.txt"):
      # calculate COCO info for all keypoints
      coco_stats, print_coco = summarize(coco_evaluator)
  
      # 将验证结果保存至txt文件中
      with open(save_name, "w") as f:
          record_lines = ["COCO results:", print_coco]
          f.write("\n".join(record_lines))
  
file_path: deep-learning-for-image-processing/pytorch_keypoint/HRNet/validation.py
imports: import os
  import json
  import torch
  from tqdm import tqdm
  import numpy
  from model import HighResolutionNet
  from train_utils import EvalCOCOMetric
  from my_dataset_coco import CocoKeypoint
  import transforms
label_desc: Use image node_id 2 for calling a global function with example usage: save_info(coco_evaluator, save_name) without return types