code: def run_dist(rank, world_size, port):
      colossalai.legacy.launch(
          config={},
          rank=rank,
          world_size=world_size,
          host="localhost",
          port=port,
          backend="nccl",
      )
      _run_colo_set_process_memory_fraction_and_colo_device_memory_capacity()
  
file_path: colossalai/tests/test_legacy/test_utils/test_memory.py
imports: import pytest
  import colossalai
  from colossalai.legacy.utils.memory import colo_device_memory_capacity, colo_set_process_memory_fraction
  from colossalai.testing import spawn
  from colossalai.utils.device import get_current_device
label_desc: Use image node_id 2 for calling a global function with example usage: run_dist(rank, world_size, port) without return types