code: def test_infeasible_pg(ray_start_cluster):
      """Test infeasible pgs are scheduled after new nodes are added."""
      cluster = ray_start_cluster
      cluster.add_node(num_cpus=2)
      ray.init("auto")
  
      bundle = {"CPU": 4, "GPU": 1}
      pg = ray.util.placement_group(
          [bundle], name="worker_1", strategy="STRICT_PACK"
      )
  
      # Placement group is infeasible.
      with pytest.raises(ray.exceptions.GetTimeoutError):
          ray.get(pg.ready(), timeout=3)
  
      state = ray.util.placement_group_table()[pg.id.hex()]["stats"][
          "scheduling_state"
      ]
      assert state == "INFEASIBLE"
  
      # Add a new node. PG can now be scheduled.
      cluster.add_node(num_cpus=4, num_gpus=1)
      assert ray.get(pg.ready(), timeout=10)
  
imports: import pytest
  import os
  import sys
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import get_other_nodes, wait_for_condition, is_placement_group_removed, placement_group_assert_no_leak
  from ray._raylet import PlacementGroupID
  from ray.util.placement_group import PlacementGroup
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
  from ray.util.client.ray_client_helpers import connect_to_client_or_not
  from ray._private.runtime_env.context import RuntimeEnvContext
  from ray._private.runtime_env.plugin import RuntimeEnvPlugin
label_desc: Use image node_id 8 for calling a global function with example usage: test_infeasible_pg(ray_start_cluster) without return types