code: def gen_empty_gpu_metric(outputDir):
      old_umask = os.umask(0)
      try:
          with open(
              os.path.join(outputDir, "gpu_metrics"), "a"
          ) as outputFile:
              outPut = {}
              outPut["Timestamp"] = time.asctime(time.localtime())
              outPut["gpuCount"] = 0
              outPut["gpuInfos"] = []
              print(outPut)
              outputFile.write(
                  "{}\n".format(json.dumps(outPut, sort_keys=True))
              )
              outputFile.flush()
      except Exception:
          traceback.print_exc()
      finally:
          os.umask(old_umask)
  
file_path: nni/nni/tools/gpu_tool/gpu_metrics_collector.py
imports: import json
  import os
  import subprocess
  import sys
  import time
  import traceback
  from xml.dom import minidom
label_desc: Use image node_id 3 for calling a global function with example usage: gen_empty_gpu_metric(outputDir) without return types