code: def get_gpu_info() -> OrderedDict:
      output: OrderedDict = OrderedDict()
  
      num_gpus = torch.cuda.device_count()
      _dict_append(output, "Num GPUs", lambda: num_gpus)
  
      _dict_append(
          output, "Has CUDA", lambda: bool(torch.cuda.is_available())
      )
  
      if output["Has CUDA"]:
          _dict_append(
              output, "CUDA version", lambda: torch.version.cuda
          )
      cudnn_ver = torch.backends.cudnn.version()
      _dict_append(output, "cuDNN enabled", lambda: bool(cudnn_ver))
      _dict_append(
          output,
          "NVIDIA_TF32_OVERRIDE",
          os.environ.get("NVIDIA_TF32_OVERRIDE"),
      )
      _dict_append(
          output,
          "TORCH_ALLOW_TF32_CUBLAS_OVERRIDE",
          os.environ.get("TORCH_ALLOW_TF32_CUBLAS_OVERRIDE"),
      )
  
      if cudnn_ver:
          _dict_append(output, "cuDNN version", lambda: cudnn_ver)
  
      if num_gpus > 0:
          _dict_append(
              output, "Current device", torch.cuda.current_device
          )
          _dict_append(
              output,
              "Library compiled for CUDA architectures",
              torch.cuda.get_arch_list,
          )
  
      for gpu in range(num_gpus):
          gpu_info = torch.cuda.get_device_properties(gpu)
          _dict_append(output, f"GPU {gpu} Name", gpu_info.name)
          _dict_append(
              output,
              f"GPU {gpu} Is integrated",
              bool(gpu_info.is_integrated),
          )
          _dict_append(
              output,
              f"GPU {gpu} Is multi GPU board",
              bool(gpu_info.is_multi_gpu_board),
          )
          _dict_append(
              output,
              f"GPU {gpu} Multi processor count",
              gpu_info.multi_processor_count,
          )
          _dict_append(
              output,
              f"GPU {gpu} Total memory (GB)",
              round(gpu_info.total_memory / 1024**3, 1),
          )
          _dict_append(
              output,
              f"GPU {gpu} CUDA capability (maj.min)",
              f"{gpu_info.major}.{gpu_info.minor}",
          )
  
      return output
  
imports: from __future__ import annotations
  import getpass
  import os
  import platform
  import re
  import sys
  from collections import OrderedDict
  from typing import TextIO
  import numpy
  import torch
  import monai
  from monai.utils.module import OptionalImportError, get_package_version, optional_import
label_desc: Use image node_id 7 for calling a global function with example usage: get_gpu_info() and returns: output