code: def check_equal(a, b):
      if type(a) != type(b):
          return False
      if isinstance(a, (list, tuple, set)):
          if len(a) != len(b):
              return False
          for sub_a, sub_b in zip(a, b):
              if not check_equal(sub_a, sub_b):
                  return False
          return True
      elif isinstance(a, dict):
          keys_a, kes_b = set(a.keys()), set(b.keys())
          if keys_a != kes_b:
              return False
          for key in keys_a:
              if not check_equal(a[key], b[key]):
                  return False
          return True
      elif isinstance(a, torch.Tensor):
          # may not euqal on gpu
          return torch.std(a - b).item() < 1e-6
      else:
          return a == b
  
file_path: nni/test/algo/compression/pruning/test_concrete_trace_mmdetection.py
imports: import pytest
  import os
  import torch
  import mmcv.cnn
  import mmdet.models
  from mmdet.apis import init_detector
  from mmdet.testing import demo_mm_inputs, get_detector_cfg
  from mmengine import Config
  from nni.common.concrete_trace_utils import concrete_trace, ConcreteTracer
label_desc: Use image node_id 1 for calling a global function with example usage: check_equal(a, b) and returns: False, True, False, True, False, False, unknown, unknown, False