code: def _run_ckpt_solver_torch11(rank, world_size, port):
      colossalai.launch(
          config={},
          rank=rank,
          world_size=world_size,
          host="localhost",
          port=port,
          backend="nccl",
      )
      MODEL_LIST = [tm.densenet121]
  
      torch.backends.cudnn.deterministic = True
  
      tracer = ColoTracer(trace_act_ckpt=False)
  
      data = torch.rand(8, 3, 32, 32, device="meta")
      for solver in SOLVERS:
          for model_cls in MODEL_LIST:
              m = model_cls(num_classes=5)
              graph = tracer.trace(root=m)
              gm = ColoGraphModule(
                  copy.deepcopy(m), graph, m.__class__.__name__
              )
              MetaInfoProp(gm).run(data)
              gm.graph._python_code = (
                  python_code_with_activation_checkpoint.__get__(graph)
              )
              if solver == solver_rotor:
                  gm = solver(
                      gm,
                      data,
                      mem_limit=500 * 1024 * 1024,
                      mem_slots=500,
                      force_python=True,
                  )
              else:
                  gm = solver(gm)
              assert _is_graph_linearized(
                  gm
              ), f"Solver {solver} did not solve {model_cls} in a linearized manner."
              assert _is_activation_checkpoint_available(
                  gm
              ), f"Solver {solver} did not annotate {model_cls} with any activation checkpoints"
              check_backward_consistency(m, gm, solver, model_cls)
      gpc.destroy()
  
imports: import copy
  import re
  from typing import Callable
  import pytest
  import torch
  import torchvision.models
  from torch.fx import GraphModule
  import colossalai
  from colossalai.fx import ColoTracer
  from colossalai.fx._compatibility import is_compatible_with_meta
  from colossalai.fx.graph_module import ColoGraphModule
  from colossalai.fx.passes.meta_info_prop import MetaInfoProp
  from colossalai.legacy.core import global_context
  from colossalai.testing import rerun_if_address_is_in_use, spawn
label_desc: Use image node_id 7 for calling a global function with example usage: _run_ckpt_solver_torch11(rank, world_size, port) without return types