code: def test_request_cluster_resources(ctx: dict):
      from ray.autoscaler._private.commands import request_resources
  
      request_resources(num_cpus=8)
  
      ctx["num_cpus"] += 8
      ctx["num_nodes"] += 8 // WORKER_NODE_CPU
  
      # Assert on number of worker nodes.
      logger.info(
          f"Requesting cluster constraints: {ctx['num_nodes']} nodes, "
          f"{ctx['num_cpus']} cpus"
      )
      wait_for_condition(
          check_cluster,
          timeout=60 * 5,  # 5min
          retry_interval_ms=DEFAULT_RETRY_INTERVAL_MS,
          targets=[
              NodeCountCheck(ctx["num_nodes"]),
              TotalResourceCheck({"CPU": ctx["num_cpus"]}),
          ],
      )
  
      # Reset the cluster constraints.
      request_resources(num_cpus=0)
  
      ctx["num_cpus"] -= 8
      ctx["num_nodes"] -= 8 // WORKER_NODE_CPU
      logger.info(
          f"Waiting for cluster go idle after constraint cleared: {ctx['num_nodes']} "
          f"nodes, {ctx['num_cpus']} cpus"
      )
      wait_for_condition(
          check_cluster,
          timeout=60 + IDLE_TERMINATION_S,  # 1min + idle timeout
          retry_interval_ms=DEFAULT_RETRY_INTERVAL_MS,
          targets=[
              NodeCountCheck(ctx["num_nodes"]),
              TotalResourceCheck({"CPU": ctx["num_cpus"]}),
          ],
      )
  
imports: import ray
  from ray._private.test_utils import wait_for_condition
  from ray.autoscaler.v2.tests.util import NodeCountCheck, TotalResourceCheck, check_cluster
  import time
  from logger import logger
label_desc: Use image node_id 1 for calling a global function with example usage: test_request_cluster_resources(ctx) without return types