code: def get_supported_gpus(host, is_dynamic_pci_passthrough):
      """
      This function returns all the supported GPUs on this host,
      currently "supported" means Nvidia GPU.
      """
      gpu_cards = []
      # This host has no GPU card, return empty array
      if host.config.graphicsInfo is None:
          return gpu_cards
      # Currently, only support nvidia GPU
      for graphics_info in host.config.graphicsInfo:
          if "nvidia" in graphics_info.vendorName.lower():
              # When dynamic passthrough is enabled, if Hareware Label is
              # set, save the info, avoid to choose wrong GPU card
              # For example, 2 host, each host has 1 GPU card with same pciId.
              # If the two GPU cards have same Hareware Label, no problem.
              # But if the two GPU cards have different Hareware Label,
              # they are all visiable to all VMs. Need this Hareware Label
              # info to choose one which is on VM's host
              if (
                  is_dynamic_pci_passthrough
                  and host.config.assignableHardwareConfig.attributeOverride
              ):
                  for (
                      attr
                  ) in (
                      host.config.assignableHardwareConfig.attributeOverride
                  ):
                      if graphics_info.pciId in attr.instanceId:
                          gpu_card = GPUCard(
                              graphics_info.pciId, attr.value
                          )
                          gpu_cards.append(gpu_card)
                          break
              else:
                  gpu_card = GPUCard(graphics_info.pciId)
                  gpu_cards.append(gpu_card)
  
      return gpu_cards
  
file_path: ray/python/ray/autoscaler/_private/vsphere/gpu_utils.py
imports: import logging
  from pyVim.task import WaitForTask
  from pyVmomi import vim
label_desc: Use image node_id 3 for calling a global function with example usage: get_supported_gpus(host, is_dynamic_pci_passthrough) and returns: gpu_cards, gpu_cards