code: def test_placement_group_gpu_unique_assigned(
      ray_start_cluster, connect_to_client
  ):
      cluster = ray_start_cluster
      cluster.add_node(num_gpus=4, num_cpus=4)
      ray.init(address=cluster.address)
      gpu_ids_res = set()
  
      # Create placement group with 4 bundles using 1 GPU each.
      num_gpus = 4
      bundles = [{"GPU": 1, "CPU": 1} for _ in range(num_gpus)]
      pg = placement_group(bundles)
      ray.get(pg.ready())
  
      # Actor using 1 GPU that has a method to get
      #  $CUDA_VISIBLE_DEVICES env variable.
      @ray.remote(num_gpus=1, num_cpus=1)
      class Actor:
          def get_gpu(self):
              import os
  
              return os.environ["CUDA_VISIBLE_DEVICES"]
  
      # Create actors out of order.
      actors = []
      actors.append(
          Actor.options(
              scheduling_strategy=PlacementGroupSchedulingStrategy(
                  placement_group=pg, placement_group_bundle_index=0
              )
          ).remote()
      )
      actors.append(
          Actor.options(
              scheduling_strategy=PlacementGroupSchedulingStrategy(
                  placement_group=pg, placement_group_bundle_index=3
              )
          ).remote()
      )
      actors.append(
          Actor.options(
              scheduling_strategy=PlacementGroupSchedulingStrategy(
                  placement_group=pg, placement_group_bundle_index=2
              )
          ).remote()
      )
      actors.append(
          Actor.options(
              scheduling_strategy=PlacementGroupSchedulingStrategy(
                  placement_group=pg, placement_group_bundle_index=1
              )
          ).remote()
      )
  
      for actor in actors:
          gpu_ids = ray.get(actor.get_gpu.remote())
          assert len(gpu_ids) == 1
          gpu_ids_res.add(gpu_ids)
  
      assert len(gpu_ids_res) == 4
  
imports: import sys
  import time
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray.cluster_utils
  import ray.experimental.internal_kv
  from ray._private.ray_constants import DEBUG_AUTOSCALING_ERROR, DEBUG_AUTOSCALING_STATUS
  from ray.autoscaler._private.constants import AUTOSCALER_UPDATE_INTERVAL_S
  from ray._private.test_utils import convert_actor_state, generate_system_config_map, is_placement_group_removed, kill_actor_and_wait_for_failure, reset_autoscaler_v2_enabled_cache, run_string_as_driver, wait_for_condition
  from ray.autoscaler._private.commands import debug_status
  from ray.exceptions import RaySystemError
  from ray.util.client.ray_client_helpers import connect_to_client_or_not
  from ray.util.placement_group import placement_group, remove_placement_group
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 12 for calling a global function with example usage: test_placement_group_gpu_unique_assigned(ray_start_cluster, connect_to_client) and returns: os