code: def compute_zone_weights(
      self,
      worker_cores: int,
      local_ssd_data_disk: bool,
      data_disk_size_gb: int,
      preemptible: bool,
      regions: List[str],
  ) -> List[ZoneWeight]:
      weights = []
      for region_name, r in self._region_info.items():
          if region_name not in regions:
              continue
  
          quota_remaining = {
              q["metric"]: q["limit"] - q["usage"] for q in r["quotas"]
          }
  
          cpu_label = "PREEMPTIBLE_CPUS" if preemptible else "CPUS"
          remaining = quota_remaining[cpu_label] / worker_cores
  
          if local_ssd_data_disk:
              specific_disk_type_quota = quota_remaining[
                  "LOCAL_SSD_TOTAL_GB"
              ]
          else:
              specific_disk_type_quota = quota_remaining["SSD_TOTAL_GB"]
          # FIXME: data_disk_size_gb is assumed to be constant across all instances, but it is
          # passed as a variable parameter to this function!!
          remaining = min(
              remaining, specific_disk_type_quota / data_disk_size_gb
          )
  
          weight = max(remaining / len(r["zones"]), 1)
          for z in r["zones"]:
              zone_name = url_basename(z)
              weights.append(ZoneWeight(zone_name, weight))
  
      log.info(f"zone_weights {weights}")
      return weights
  
imports: import collections
  import logging
  import random
  from typing import Any, Dict, List, Set, Tuple
  from hailtop.aiocloud import aiogoogle
  from hailtop.utils import url_basename
  from ....driver.exceptions import RegionsNotSupportedError
  from ....driver.location import CloudLocationMonitor
  from ....utils import WindowFractionCounter
label_desc: Use image node_id 5 for calling the ZoneMonitor obj's underlying member method code with example usage: obj.compute_zone_weights(worker_cores, local_ssd_data_disk, data_disk_size_gb, preemptible, regions) and returns: weights