code: def _single_machine_run(
      num_parts, world_size, partitions_dir, ntypes, id_map, test_data
  ):
      port_num = np.random.randint(10000, 20000, size=(1,), dtype=int)[
          0
      ]
      ctx = mp.get_context("spawn")
      processes = []
      for rank in range(world_size):
          p = ctx.Process(
              target=_run,
              args=(
                  port_num,
                  rank,
                  num_parts,
                  world_size,
                  partitions_dir,
                  ntypes,
                  id_map,
                  test_data,
              ),
          )
          p.start()
          processes.append(p)
  
      for p in processes:
          p.join()
          p.close()
  
imports: import logging
  import os
  import platform
  import tempfile
  from datetime import timedelta
  import dgl
  import numpy
  import pyarrow
  import pytest
  import torch.distributed
  import torch.multiprocessing
  from pytest_utils import create_chunked_dataset
  from tools.distpartitioning import constants, dist_lookup
  from tools.distpartitioning.gloo_wrapper import allgather_sizes
  from tools.distpartitioning.utils import get_idranges, get_ntype_counts_map, read_json
label_desc: Use image node_id 4 for calling a global function with example usage: _single_machine_run(num_parts, world_size, partitions_dir, ntypes, id_map, test_data) without return types