code: def nvsmi(attrs):
      attrs = ",".join(attrs)
      cmd = [
          "nvidia-smi",
          "-i",
          "0",
          "--query-gpu=" + attrs,
          "--format=csv,noheader,nounits",
      ]
      out = subprocess.check_output(cmd)
      ret = out.decode(sys.stdout.encoding).split(",")
      ret = [int(x) for x in ret]
      return ret
  
imports: import functools
  import os
  import subprocess
  import sys
  from contextlib import contextmanager
  from typing import Any, Dict, List
  from .None import language
label_desc: Use image node_id 1 for calling a global function with example usage: nvsmi(attrs) and returns: ret