code: def test_custom_resources(ray_start_regular_shared):
      current_resources = ray.available_resources()
      assert current_resources["CPU"] == 1.0
  
      # By default an actor should not reserve any resources.
      q = Queue()
      current_resources = ray.available_resources()
      assert current_resources["CPU"] == 1.0
      q.shutdown()
  
      # Specify resource requirement. The queue should now reserve 1 CPU.
      q = Queue(actor_options={"num_cpus": 1})
  
      def no_cpu_in_resources():
          return "CPU" not in ray.available_resources()
  
      wait_for_condition(no_cpu_in_resources)
      q.shutdown()
  
file_path: ray/python/ray/tests/test_queue.py
imports: import pytest
  import time
  import ray
  from ray.exceptions import GetTimeoutError, RayActorError
  from ray.util.queue import Queue, Empty, Full
  from ray._private.test_utils import wait_for_condition, BatchQueue
label_desc: Use image node_id 11 for calling a global function with example usage: test_custom_resources(ray_start_regular_shared) and returns: unknown