code: def run_dist(rank, world_size, port):
      colossalai.legacy.launch(
          config=CONFIG,
          rank=rank,
          world_size=world_size,
          host="localhost",
          port=port,
          backend="nccl",
      )
  
file_path: colossalai/tests/test_legacy/test_trainer/test_trainer_with_non_pipe_schedule.py
imports: import pytest
  import torch
  import colossalai
  from colossalai.legacy.amp.amp_type import AMP_TYPE
  from colossalai.legacy.trainer import Trainer
  from colossalai.logging import get_dist_logger
  from colossalai.testing import DummyDataloader, parameterize, rerun_if_address_is_in_use, spawn
  from colossalai.utils import MultiTimer
  from tests.kit.model_zoo import model_zoo
label_desc: Use image node_id 2 for calling a global function with example usage: run_dist(rank, world_size, port) without return types