code: def collect_gpu_usage(node_id):
      cmd = "nvidia-smi -q -x".split()
      info = None
      try:
          smi_output = subprocess.check_output(cmd)
          info = parse_nvidia_smi_result(smi_output)
      except Exception:
          traceback.print_exc()
          info = gen_empty_gpu_metric()
      return info
  
imports: import subprocess
  import time
  import traceback
  from xml.dom import minidom
label_desc: Use image node_id 1 for calling a global function with example usage: collect_gpu_usage(node_id) and returns: info