code: def __init__(
      self,
      info: Any,
      gpu_index: int,
      type_: Literal["compute", "graphics"],
      detail: bool,
  ):
      self.pid = info.pid
      if detail:
          self.name = nvmlSystemGetProcessName(self.pid)
      self.gpu_index = gpu_index
      self.type = type_
      self.used_gpu_memory = info.usedGpuMemory
  
file_path: nni/nni/tools/nni_manager_scripts/collect_gpu_info.py
imports: from __future__ import annotations
  from dataclasses import asdict, dataclass
  import json
  import sys
  from typing import Any, Literal
  from pynvml import *
label_desc: Use image node_id 1 to create a new ProcessInfo object  with example: obj = ProcessInfo(info, gpu_index, type_, detail)