code: def update(self, predictions):
      img_ids = list(np.unique(list(predictions.keys())))
      self.img_ids.extend(img_ids)
  
      for iou_type in self.iou_types:
          results = self.prepare(predictions, iou_type)
          coco_dt = (
              loadRes(self.coco_gt, results) if results else COCO()
          )
          coco_eval = self.coco_eval[iou_type]
  
          coco_eval.cocoDt = coco_dt
          coco_eval.params.imgIds = list(img_ids)
          img_ids, eval_imgs = evaluate(coco_eval)
  
          self.eval_imgs[iou_type].append(eval_imgs)
  
imports: import json
  import copy
  from collections import defaultdict
  import numpy
  import torch
  import torch._six
  from pycocotools.cocoeval import COCOeval
  from pycocotools.coco import COCO
  import pycocotools.mask
  from .distributed_utils import all_gather
label_desc: Use image node_id 2 for calling the CocoEvaluator obj's underlying member method code with example usage: obj.update(predictions) without return types