code: def allclose(
      a: NdarrayTensor,
      b: NdarrayOrTensor,
      rtol=1e-5,
      atol=1e-8,
      equal_nan=False,
  ) -> bool:
      """`np.allclose` with equivalent implementation for torch."""
      b, *_ = convert_to_dst_type(b, a, wrap_sequence=True)
      if isinstance(a, np.ndarray):
          return np.allclose(
              a, b, rtol=rtol, atol=atol, equal_nan=equal_nan
          )
      return torch.allclose(
          a, b, rtol=rtol, atol=atol, equal_nan=equal_nan
      )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from typing import TypeVar
  import numpy
  import torch
  from monai.config.type_definitions import NdarrayOrTensor, NdarrayTensor
  from monai.utils.misc import is_module_ver_at_least
  from monai.utils.type_conversion import convert_data_type, convert_to_dst_type
label_desc: Use image node_id 1 for calling a global function with example usage: allclose(a, b, rtol, atol, equal_nan) and returns: torch, np