code: def has_ampere_or_later() -> bool:
      """
      Check if there is any Ampere and later GPU.
      """
      import torch
  
      from monai.utils.module import optional_import, version_geq
  
      if not (
          torch.version.cuda
          and version_geq(f"{torch.version.cuda}", "11.0")
      ):
          return False
  
      pynvml, has_pynvml = optional_import("pynvml")
      if (
          not has_pynvml
      ):  # assuming that the user has Ampere and later GPU
          return True
  
      try:
          pynvml.nvmlInit()
          for i in range(pynvml.nvmlDeviceGetCount()):
              handle = pynvml.nvmlDeviceGetHandleByIndex(i)
              major, _ = pynvml.nvmlDeviceGetCudaComputeCapability(
                  handle
              )
              if major >= 8:
                  return True
      except BaseException:
          pass
      finally:
          pynvml.nvmlShutdown()
  
      return False
  
imports: from __future__ import annotations
  import functools
  import os
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: has_ampere_or_later() and returns: False, False, True, True