code: def check_result_same(results, pipeline_results, check_keys):
      """Check whether the ``pipeline_results`` is the same with the predefined
      ``results``.
  
      Args:
          results (dict): Predefined results which should be the standard
              output of the transform pipeline.
          pipeline_results (dict): Results processed by the transform
              pipeline.
          check_keys (tuple): Keys that need to be checked between
              results and pipeline_results.
      """
      for key in check_keys:
          if results.get(key, None) is None:
              continue
          if isinstance(results[key], (BitmapMasks, PolygonMasks)):
              assert_allclose(
                  pipeline_results[key].to_ndarray(),
                  results[key].to_ndarray(),
              )
          elif isinstance(results[key], BaseBoxes):
              assert_allclose(
                  pipeline_results[key].tensor, results[key].tensor
              )
          else:
              assert_allclose(pipeline_results[key], results[key])
  
file_path: mmdetection/tests/test_datasets/test_transforms/utils.py
imports: import numpy
  from mmengine.testing import assert_allclose
  from mmdet.structures.bbox import BaseBoxes, HorizontalBoxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
label_desc: Use image node_id 4 for calling a global function with example usage: check_result_same(results, pipeline_results, check_keys) without return types