code: def _assert_equal(d1, d2):
      try:
          if "torch" in str(type(d1)):
              assert (d1 == d2).all().item()
          elif "oneflow" in str(type(d1)):
              assert (d1 == d2).all().item()
          else:
              assert all(d1 == d2)
      except TypeError:
          assert d1 == d2
      except ValueError:
          assert (d1 == d2).all()
  
imports: import numpy
  import pytest
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH, _NEED_IMPORT_PADDLE, _NEED_IMPORT_JITTOR, _NEED_IMPORT_ONEFLOW
  from fastNLP.core.collators.collator import Collator
  from ...helpers.utils import Capturing
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_equal(d1, d2) without return types