code: def test_pending_placement_group_wait(
      ray_start_cluster, connect_to_client
  ):
      cluster = ray_start_cluster
      [cluster.add_node(num_cpus=2) for _ in range(1)]
      ray.init(address=cluster.address)
      cluster.wait_for_nodes()
  
      with connect_to_client_or_not(connect_to_client):
          # Wait on placement group that cannot be created.
          placement_group = ray.util.placement_group(
              name="name",
              strategy="SPREAD",
              bundles=[
                  {"CPU": 2},
                  {"CPU": 2},
                  {"GPU": 2},
              ],
          )
          ready, unready = ray.wait(
              [placement_group.ready()], timeout=0.1
          )
          assert len(unready) == 1
          assert len(ready) == 0
          table = ray.util.placement_group_table(placement_group)
          assert table["state"] == "PENDING"
          for i in range(3):
              assert len(table["bundles_to_node_id"][i]) == 0
  
          with pytest.raises(ray.exceptions.GetTimeoutError):
              ray.get(placement_group.ready(), timeout=0.1)
  
imports: import sys
  import time
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray.cluster_utils
  from ray._private.test_utils import convert_actor_state, generate_system_config_map, get_error_message, get_other_nodes, kill_actor_and_wait_for_failure, placement_group_assert_no_leak, run_string_as_driver, wait_for_condition
  from ray.util.client.ray_client_helpers import connect_to_client_or_not
  from ray.util.placement_group import get_current_placement_group
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 2 for calling a global function with example usage: test_pending_placement_group_wait(ray_start_cluster, connect_to_client) without return types