code: def test_neuron_core_with_placement_group(shutdown_only):
      neuron_cores = 2
      ray.init(num_cpus=1, resources={"neuron_cores": neuron_cores})
  
      @ray.remote(resources={"neuron_cores": neuron_cores})
      class NeuronCoreActor:
          def __init__(self):
              pass
  
          def ready(self):
              neuron_core_ids = (
                  ray.get_runtime_context().get_accelerator_ids()[
                      "neuron_cores"
                  ]
              )
              assert len(neuron_core_ids) == neuron_cores
              assert os.environ["NEURON_RT_VISIBLE_CORES"] == ",".join(
                  [str(i) for i in neuron_core_ids]  # noqa
              )
  
      # Reserve a placement group of 1 bundle that reserves 1 CPU and 2 NeuronCore.
      pg = placement_group([{"CPU": 1, "neuron_cores": neuron_cores}])
  
      # Wait until placement group is created.
      ray.get(pg.ready(), timeout=10)
  
      actor = NeuronCoreActor.options(
          scheduling_strategy=PlacementGroupSchedulingStrategy(
              placement_group=pg,
          )
      ).remote()
  
      ray.get(actor.ready.remote(), timeout=10)
  
imports: import logging
  import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import RayTestTimeoutException, wait_for_condition
  from ray.util.placement_group import placement_group
  from ray.util.accelerators import AWS_NEURON_CORE
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 12 for calling a global function with example usage: test_neuron_core_with_placement_group(shutdown_only) without return types