code: def test_split_in_process_groups(self) -> None:
      # Standards use cases
      pids = split_world_in_process_groups(world_size=9, group_size=3)
      self.assertEqual(pids, [[0, 1, 2], [3, 4, 5], [6, 7, 8]])
      pids = split_world_in_process_groups(world_size=9, group_size=4)
      self.assertEqual(pids, [[0, 1, 2, 3], [4, 5, 6, 7], [8]])
  
      # Pathological use cases
      pids = split_world_in_process_groups(world_size=0, group_size=1)
      self.assertEqual(pids, [])
      pids = split_world_in_process_groups(world_size=5, group_size=6)
      self.assertEqual(pids, [[0, 1, 2, 3, 4]])
  
file_path: vissl/tests/test_model_helpers.py
imports: import unittest
  import torch
  import torch.multiprocessing
  import torch.nn
  from parameterized import param, parameterized
  from torch.nn.parallel import DistributedDataParallel
  from vissl.config import AttrDict
  from vissl.models.model_helpers import convert_sync_bn, split_world_in_process_groups
  from vissl.utils.env import set_env_vars
  from vissl.utils.test_utils import gpu_test, init_distributed_on_file, with_temp_files
label_desc: Use image node_id 1 for calling the TestModelHelpers obj's underlying member method code with example usage: obj.test_split_in_process_groups() without return types