code: def get_offers(
      self, requirements: Optional[Requirements] = None
  ) -> List[InstanceOfferWithAvailability]:
      offers = get_catalog_offers(
          backend=BackendType.AWS,
          locations=self.config.regions,
          requirements=requirements,
          extra_filter=_supported_instances,
      )
      regions = set(i.region for i in offers)
  
      def get_quotas(
          client: botocore.client.BaseClient,
      ) -> Dict[str, int]:
          region_quotas = {}
          for page in client.get_paginator(
              "list_service_quotas"
          ).paginate(ServiceCode="ec2"):
              for q in page["Quotas"]:
                  if "On-Demand" in q["QuotaName"]:
                      region_quotas[
                          q["UsageMetric"]["MetricDimensions"]["Class"]
                      ] = q["Value"]
          return region_quotas
  
      quotas = {}
      with ThreadPoolExecutor(max_workers=8) as executor:
          future_to_region = {}
          for region in regions:
              future = executor.submit(
                  get_quotas,
                  self.session.client(
                      "service-quotas", region_name=region
                  ),
              )
              future_to_region[future] = region
          for future in as_completed(future_to_region):
              quotas[future_to_region[future]] = future.result()
  
      availability_offers = []
      for offer in offers:
          availability = InstanceAvailability.UNKNOWN
          if not _has_quota(quotas[offer.region], offer.instance.name):
              availability = InstanceAvailability.NO_QUOTA
          availability_offers.append(
              InstanceOfferWithAvailability(
                  **offer.dict(), availability=availability
              )
          )
      return availability_offers
  
imports: from concurrent.futures import ThreadPoolExecutor, as_completed
  from typing import Dict, List, Optional
  import boto3
  import botocore.client
  import botocore.exceptions
  import dstack._internal.core.backends.aws.resources
  import dstack.version
  from dstack._internal import settings
  from dstack._internal.core.backends.aws.config import AWSConfig
  from dstack._internal.core.backends.base.compute import Compute, get_gateway_user_data, get_instance_name, get_user_data
  from dstack._internal.core.backends.base.offers import get_catalog_offers
  from dstack._internal.core.errors import NoCapacityError
  from dstack._internal.core.models.backends.aws import AWSAccessKeyCreds
  from dstack._internal.core.models.backends.base import BackendType
  from dstack._internal.core.models.instances import InstanceAvailability, InstanceOffer, InstanceOfferWithAvailability, InstanceState, LaunchedGatewayInfo, LaunchedInstanceInfo
  from dstack._internal.core.models.runs import Job, Requirements, Run
  from dstack._internal.utils.logging import get_logger
label_desc: Use image node_id 2 for calling the AWSCompute obj's underlying member method code with example usage: obj.get_offers(requirements) and returns: availability_offers, region_quotas