code: def test_multi_node_pgs(ray_start_cluster):
      cluster = ray_start_cluster
      cluster.add_node(num_cpus=2)
      cluster.wait_for_nodes(2)
      ray.init(address=cluster.address)
  
      pgs = [ray.util.placement_group([{"CPU": 1}]) for _ in range(4)]
  
      ready, not_ready = ray.wait(
          [pg.ready() for pg in pgs], timeout=5, num_returns=4
      )
      assert len(ready) == 2
      assert len(not_ready) == 2
  
      cluster.add_node(num_cpus=2)
      cluster.wait_for_nodes(3)
      ready, not_ready = ray.wait(
          [pg.ready() for pg in pgs], timeout=5, num_returns=4
      )
      assert len(ready) == 4
      assert len(not_ready) == 0
  
      for i in range(4, 10):
          cluster.add_node(num_cpus=2)
          cluster.wait_for_nodes(i)
          print(".")
          more_pgs = [
              ray.util.placement_group([{"CPU": 1}]) for _ in range(2)
          ]
          ready, not_ready = ray.wait(
              [pg.ready() for pg in more_pgs], timeout=5, num_returns=2
          )
          assert len(ready) == 2
  
file_path: ray/python/ray/tests/test_multi_node_2.py
imports: import logging
  import time
  import pytest
  import ray
  from ray._private.test_utils import SignalActor, generate_system_config_map, wait_for_condition
  from ray.autoscaler._private.monitor import Monitor
  from ray.autoscaler.sdk import request_resources
  from ray.cluster_utils import Cluster
  from ray.util.placement_group import placement_group, remove_placement_group
label_desc: Use image node_id 11 for calling a global function with example usage: test_multi_node_pgs(ray_start_cluster) without return types