class_docstr: mAP evaluation metrics for the VIS task.
  
  Args:
      metric (str | list[str]): Metrics to be evaluated.
          Default value is `youtube_vis_ap`.
      metric_items (List[str], optional): Metric result names to be
          recorded in the evaluation result. Defaults to None.
      outfile_prefix (str | None): The prefix of json files. It includes
          the file path and the prefix of filename, e.g., "a/b/prefix".
          If not specified, a temp file will be created. Defaults to None.
      collect_device (str): Device name used for collecting results from
          different ranks during distributed training. Must be 'cpu' or
          'gpu'. Defaults to 'cpu'.
      prefix (str, optional): The prefix that will be added in the metric
          names to disambiguate homonyms metrics of different evaluators.
          If prefix is not provided in the argument, self.default_prefix
          will be used instead. Default: None
      format_only (bool): If True, only formatting the results to the
          official format and not performing evaluation. Defaults to False.
docstr: Save the results to a zip file (standard format for YouTube-VIS
  Challenge).
  
  Args:
      pred_results (list): Testing results of the
          dataset.
docstr_tok: ["Save","the","results","to","a","zip","file","(","standard","format","for","YouTube-VIS","Challenge",")",".","Args",":","pred_results","(","list",")",":","Testing","results","of","the","dataset","."]
code: def save_pred_results(self, pred_results: List) -> None:
      """Save the results to a zip file (standard format for YouTube-VIS
      Challenge).
  
      Args:
          pred_results (list): Testing results of the
              dataset.
      """
      logger: MMLogger = MMLogger.get_current_instance()
      if self.outfile_prefix is None:
          tmp_dir = tempfile.TemporaryDirectory()
          outfile_prefix = osp.join(tmp_dir.name, "results")
      else:
          outfile_prefix = self.outfile_prefix
      mmengine.dump(pred_results, f"{outfile_prefix}.json")
      # zip the json file in order to submit to the test server.
      zip_file_name = f"{outfile_prefix}.submission_file.zip"
      zf = zipfile.ZipFile(zip_file_name, "w", zipfile.ZIP_DEFLATED)
      logger.info(
          f"zip the 'results.json' into '{zip_file_name}', "
          "please submmit the zip file to the test server"
      )
      zf.write(f"{outfile_prefix}.json", "results.json")
      zf.close()
  
imports: import os.path
  import tempfile
  import warnings
  import zipfile
  from collections import OrderedDict, defaultdict
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  import mmengine
  import numpy
  from mmengine.dist import all_gather_object, barrier, broadcast_object_list, is_main_process
  from mmengine.logging import MMLogger
  from mmdet.registry import METRICS
  from mmdet.structures.mask import encode_mask_results
  from ..functional import YTVIS, YTVISeval
  from .base_video_metric import BaseVideoMetric, collect_tracking_results
label_desc: Use image node_id 8 for calling the YouTubeVISMetric obj's underlying member method code with example usage: obj.save_pred_results(pred_results) without return types