code: def check_act_ckpt(rank, world_size, port):
      disable_existing_loggers()
      launch(
          config={},
          rank=rank,
          world_size=world_size,
          host="localhost",
          port=port,
          backend="nccl",
      )
      model = GPT2MLPWithCkpt(
          intermediate_size=4 * HIDDEN_SIZE, hidden_size=HIDDEN_SIZE
      )
      torch.rand(1, 64, HIDDEN_SIZE)
      input_sample = {
          "hidden_states": torch.rand(1, 64, HIDDEN_SIZE).to("meta"),
      }
      physical_mesh_id = torch.arange(0, 4)
      mesh_shape = (2, 2)
      # [[0, 1]
      #  [2, 3]]
      device_mesh = DeviceMesh(
          physical_mesh_id, mesh_shape, init_process_group=True
      )
      gm = initialize_model(model, input_sample, device_mesh)
      code = gm.module.graph.python_code("self").src
      assert (
          "runtime_comm_spec_apply_1 = colossalai_auto_parallel_passes_runtime_apply_pass_runtime_comm_spec_apply(linear_1, comm_actions_dict, 12, 'linear_1')"
          in code
      )
      assert (
          "view_3 = torch.utils.checkpoint.checkpoint(self.checkpoint_0, view_1, comm_actions_dict, use_reentrant=False)"
          in code
      )
  
file_path: ColossalAI/tests/test_auto_parallel/test_tensor_shard/test_checkpoint.py
imports: from typing import Optional, Tuple
  import pytest
  import torch
  import torch.nn
  from torch.utils.checkpoint import checkpoint
  from transformers.pytorch_utils import Conv1D
  from colossalai.device.device_mesh import DeviceMesh
  from colossalai.initialize import launch
  from colossalai.logging import disable_existing_loggers
  from colossalai.testing import rerun_if_address_is_in_use, run_on_environment_flag, spawn
label_desc: Use image node_id 1 for calling a global function with example usage: check_act_ckpt(rank, world_size, port) without return types