code: def test_grouping(self, use_wm_v2):
      self.enter_context(
          flagsaver.flagsaver(lp_worker_manager_v2=use_wm_v2)
      )
      # This verifies the process handles are grouped correctly
      p = program.Program("test")
  
      with p.group("foo"):
          for _ in range(1):
              p.add_node(python.PyNode(_noop))
  
      with p.group("bar"):
          for _ in range(2):
              p.add_node(python.PyNode(_noop))
  
      resources = dict(
          foo=_get_default_py_node_config(),
          bar=_get_default_py_node_config(),
      )
      processes = launch.launch(
          p, test_case=self, local_resources=resources
      )
      if use_wm_v2:
          p_dict = (
              processes._process_workers
          )  # pytype:disable=attribute-error
      else:
          p_dict = (
              processes._active_workers
          )  # pytype:disable=attribute-error
      self.assertCountEqual(list(p_dict.keys()), ["foo", "bar"])
      self.assertLen(p_dict["foo"], 1)
      self.assertLen(p_dict["bar"], 2)
  
imports: from absl.testing import absltest
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import launchpad
  from launchpad import program
  from launchpad.launch.test_multi_processing import launch
  from launchpad.nodes.python import local_multi_processing
  from launchpad.nodes.python import node
  from launchpad.program_stopper import program_stopper
label_desc: Use image node_id 6 for calling the LaunchTest obj's underlying member method code with example usage: obj.test_grouping(use_wm_v2) without return types