code: def run_dist(rank, world_size, port):
      colossalai.legacy.launch(
          config={},
          rank=rank,
          world_size=world_size,
          host="localhost",
          port=port,
          backend="nccl",
      )
      check_mem()
      run()
  
file_path: ColossalAI/tests/test_legacy/test_tensor/core/test_dist_spec_mgr.py
imports: import math
  import pytest
  import torch
  import torch.distributed
  import colossalai
  from colossalai.legacy.tensor import DistSpecManager, ProcessGroup, ReplicaSpec, ShardSpec
  from colossalai.testing import rerun_if_address_is_in_use, spawn
label_desc: Use image node_id 3 for calling a global function with example usage: run_dist(rank, world_size, port) without return types