code: def assert_allclose(out_model: Any, out_gm: Any) -> None:
      """
      assert allclose for out
      """
      if isinstance(out_model, torch.Tensor):
          assert torch.allclose(out_model, out_gm, atol=1e-4), (
              "fx_out doesn't comply with original output, diff is %.2e"
              % torch.mean(torch.abs(out_model - out_gm))
          )
      elif isinstance(out_model, dict):
          for k in out_model.keys():
              assert_allclose(out_model[k], out_gm[k])
      elif (
          isinstance(out_model, tuple)
          or isinstance(out_model, list)
          or isinstance(out_model, set)
      ):
          for i, j in zip(out_model, out_gm):
              assert_allclose(i, j)
  
file_path: colossalai/tests/test_autochunk/test_autochunk_transformer/test_autochunk_transformer_utils.py
imports: from typing import Any, Dict, List
  import torch
  import torch.fx
  import colossalai
  from colossalai.autochunk.autochunk_codegen import AUTOCHUNK_AVAILABLE
  from colossalai.fx.graph_module import ColoGraphModule
  from colossalai.fx.passes.meta_info_prop import MetaInfoProp
label_desc: Use image node_id 2 for calling a global function with example usage: assert_allclose(out_model, out_gm) without return types