code: def assert_predictions_equal(self, preds1, preds2):
      for pred1, pred2 in zip(preds1, preds2):
          if "bboxes" in pred1:
              self.assertTrue(
                  np.allclose(pred1["bboxes"], pred2["bboxes"], 0.1)
              )
          if "scores" in pred1:
              self.assertTrue(
                  np.allclose(pred1["scores"], pred2["scores"], 0.1)
              )
          if "labels" in pred1:
              self.assertTrue(
                  np.allclose(pred1["labels"], pred2["labels"])
              )
          if "panoptic_seg_path" in pred1:
              self.assertTrue(
                  pred1["panoptic_seg_path"]
                  == pred2["panoptic_seg_path"]
              )
  
imports: import os.path
  import tempfile
  from unittest import TestCase, mock
  from unittest.mock import Mock, patch
  import mmcv
  import mmengine
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmengine.utils import is_list_of
  from parameterized import parameterized
  from mmdet.apis import DetInferencer
  from mmdet.evaluation.functional import get_classes
  from mmdet.structures import DetDataSample
label_desc: Use image node_id 2 for calling the TestDetInferencer obj's underlying member method code with example usage: obj.assert_predictions_equal(preds1, preds2) without return types