code: def get_gpu_info():
      """Get information of GPUs.
  
      Returns:
          list: List of gpu information dictionary as with `device_name`, `total_memory` (in Mb) and `free_memory` (in Mb).
          Returns an empty list if there is no cuda device available.
      """
      gpus = []
      try:
          for gpu in cuda.gpus:
              with gpu:
                  meminfo = cuda.current_context().get_memory_info()
                  g = {
                      "device_name": gpu.name.decode("ASCII"),
                      "total_memory": meminfo[1] / 1048576,  # Mb
                      "free_memory": meminfo[0] / 1048576,  # Mb
                  }
                  gpus.append(g)
      except CudaSupportError:
          pass
  
      return gpus
  
file_path: recommenders/recommenders/utils/gpu_utils.py
imports: import sys
  import os
  import glob
  import logging
  from numba import cuda
  from numba.cuda.cudadrv.error import CudaSupportError
label_desc: Use image node_id 2 for calling a global function with example usage: get_gpu_info() and returns: gpus