code: def get_gpus():
      """
      return a list of GPUs
      """
      try:
          re = subprocess.check_output(
              ["nvidia-smi", "-L"], universal_newlines=True
          )
      except OSError:
          return []
      return range(len([i for i in re.split("\n") if "GPU" in i]))
  
imports: import subprocess
  import os
  import errno
label_desc: Use image node_id 2 for calling a global function with example usage: get_gpus() and returns: range, list