code: def test_checkpoint(world_size: int, strategy_name: str, shard: bool):
      spawn(
          run_dist, world_size, strategy_name=strategy_name, shard=shard
      )
  
file_path: ColossalAI/applications/Chat/tests/test_checkpoint.py
imports: import os
  import tempfile
  from contextlib import nullcontext
  import pytest
  import torch
  import torch.distributed
  from coati.models.gpt import GPTActor
  from coati.models.utils import calc_action_log_probs
  from coati.trainer.strategies import DDPStrategy, GeminiStrategy, LowLevelZeroStrategy, Strategy
  from transformers.models.gpt2.configuration_gpt2 import GPT2Config
  from colossalai.nn.optimizer import HybridAdam
  from colossalai.testing import rerun_if_address_is_in_use, spawn
label_desc: Use image node_id 5 for calling a global function with example usage: test_checkpoint(world_size, strategy_name, shard) without return types