code: def test_nested_ckpt():
      model = MyModule()
      x = torch.rand(10, 10)
      gm = symbolic_trace(
          model, meta_args={"x": x}, trace_act_ckpt=True
      )
      assert torch.allclose(
          gm(x), model(x)
      ), "The traced model should generate the same output as the original model."
      for ckpt_def in filter(
          lambda s: s.startswith("checkpoint"), dir(model)
      ):
          assert (
              ckpt_def in gm.code
          ), f"Checkpoint {ckpt_def} should be in the traced code.\n Traced code = {gm.code}"
  
file_path: ColossalAI/tests/test_analyzer/test_fx/test_nested_ckpt.py
imports: import pytest
  import torch
  import torch.nn
  from torch.utils.checkpoint import checkpoint
  from colossalai.testing import clear_cache_before_run
label_desc: Use image node_id 1 for calling a global function with example usage: test_nested_ckpt() without return types