code: def test_schedule_placement_group_when_node_add(
      ray_start_cluster, connect_to_client
  ):
      cluster = ray_start_cluster
      cluster.add_node(num_cpus=4)
      ray.init(address=cluster.address)
  
      with connect_to_client_or_not(connect_to_client):
          # Creating a placement group that cannot be satisfied yet.
          placement_group = ray.util.placement_group(
              [{"GPU": 2}, {"CPU": 2}]
          )
  
          def is_placement_group_created():
              table = ray.util.placement_group_table(placement_group)
              if "state" not in table:
                  return False
              return table["state"] == "CREATED"
  
          # Add a node that has GPU.
          cluster.add_node(num_cpus=4, num_gpus=4)
  
          # Make sure the placement group is created.
          wait_for_condition(is_placement_group_created)
  
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 4 for calling a global function with example usage: test_schedule_placement_group_when_node_add(ray_start_cluster, connect_to_client) and returns: unknown, False