code: def assert_almost_equal(x, y, decimal=2, err_msg=""):
      import numpy.testing as npt
  
      if isinstance(x, torch.Tensor):
          if x.dtype == torch.bfloat16:
              x = x.float()
          x = x.cpu().detach().numpy()
      if isinstance(y, torch.Tensor):
          if y.dtype == torch.bfloat16:
              y = y.float()
          y = y.cpu().detach().numpy()
      npt.assert_array_almost_equal(
          x, y, err_msg=err_msg, decimal=decimal
      )
  
imports: import torch
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 4 for calling a global function with example usage: assert_almost_equal(x, y, decimal, err_msg) without return types