code: def test_uses_resources(ray_start_regular):
      cluster_resources = ray.cluster_resources()
  
      @ray.remote
      def cpu_task():
          time.sleep(1)
  
      cpu_task.remote()
      resource_used = False
  
      while not resource_used:
          available_resources = ray.available_resources()
          resource_used = (
              available_resources.get("CPU", 0)
              == cluster_resources.get("CPU", 0) - 1
          )
  
      assert resource_used
  
imports: import os
  import time
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray._private.ray_constants
  from ray._raylet import GcsClient
  from ray.core.generated import autoscaler_pb2
  from ray._private.test_utils import convert_actor_state, make_global_state_accessor, wait_for_condition
label_desc: Use image node_id 2 for calling a global function with example usage: test_uses_resources(ray_start_regular) without return types