code: def assert_allclose(
      actual: Any,
      expected: Any,
      rtol: Optional[float] = None,
      atol: Optional[float] = None,
      equal_nan: bool = True,
      msg: str = "",
  ) -> None:
      if not isinstance(actual, torch.Tensor):
          actual = torch.tensor(actual)
      if not isinstance(expected, torch.Tensor):
          expected = torch.tensor(expected, dtype=actual.dtype)
  
      if rtol is None and atol is None:
          rtol, atol = _get_default_rtol_and_atol(actual, expected)
  
      torch.testing.assert_close(
          actual,
          expected,
          rtol=rtol,
          atol=atol,
          equal_nan=equal_nan,
          check_device=True,
          check_dtype=False,
          check_stride=False,
          msg=msg or None,
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: assert_allclose(actual, expected, rtol, atol, equal_nan, msg) without return types