code: def get_test_resources_from_cluster_compute(
      cluster_compute: Dict,
  ) -> Tuple[int, int]:
      instances = []
  
      # Add head node instance
      instances.append(
          (cluster_compute["head_node_type"]["instance_type"], 1)
      )
  
      # Add worker node instances
      instances.extend(
          (
              w["instance_type"],
              w.get("max_workers", w.get("min_workers", 1)),
          )
          for w in cluster_compute["worker_node_types"]
      )
  
      aws_instance_types = load_instance_types()
      total_cpus = 0
      total_gpus = 0
  
      for instance, count in instances:
          if instance in aws_instance_types:
              instance_cpus, instance_gpus = aws_instance_types[
                  instance
              ]
          elif instance in gcp_gpu_instances:
              instance_cpus, instance_gpus = gcp_gpu_instances[instance]
          else:
              instance_cpus, instance_gpus = parse_instance_resources(
                  instance
              )
  
          total_cpus += instance_cpus * count
          total_gpus += instance_gpus * count
  
      return total_cpus, total_gpus
  
file_path: ray/release/ray_release/buildkite/concurrency.py
imports: import csv
  from collections import namedtuple
  from typing import Tuple, Optional, Dict
  from ray_release.bazel import bazel_runfile
  from ray_release.test import Test
  from ray_release.template import load_test_cluster_compute
  from ray_release.logger import logger
label_desc: Use image node_id 6 for calling a global function with example usage: get_test_resources_from_cluster_compute(cluster_compute) and returns: total_cpus,  total_gpus