code: def _assert_tensors_equal(a, b, atol=1e-12, prefix=""):
      """If tensors not close, or a and b arent both tensors, raise a nice Assertion error."""
      if a is None and b is None:
          return True
      try:
          if torch.allclose(a, b, atol=atol):
              return True
          raise
      except Exception:
          if len(prefix) > 0:
              prefix = f"{prefix}: "
          raise AssertionError(f"{prefix}{a} != {b}")
  
imports: import tempfile
  import unittest
  import timeout_decorator
  from parameterized import parameterized
  from transformers import FSMTConfig, is_torch_available
  from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device
  from transformers.utils import cached_property
  from ...generation.test_generation_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor
label_desc: Use image node_id 2 for calling a global function with example usage: _assert_tensors_equal(a, b, atol, prefix) and returns: True, True