code: def _track_gpu(self, idx: int):
      handle = self.nvml.nvmlDeviceGetHandleByIndex(idx)
  
      procs = self.nvml.nvmlDeviceGetGraphicsRunningProcesses(handle)
      for p in procs:
          key = self.pids[p.pid]
          self.processes[key].is_gpu = True
          if self.processes[key].is_tracked:
              self.data.update(
                  {
                      f"process.{key}.gpu.{idx}.mem": p.usedGpuMemory,
                  }
              )
  
      procs = self.nvml.nvmlDeviceGetComputeRunningProcesses(handle)
      for p in procs:
          key = self.pids[p.pid]
          self.processes[key].is_gpu = True
          if self.processes[key].is_tracked:
              self.data.update(
                  {
                      f"process.{key}.gpu.{idx}.mem": p.usedGpuMemory,
                  }
              )
  
file_path: labml/client/labml/internal/computer/monitor/process.py
imports: from typing import Dict, List
  import psutil
label_desc: Use image node_id 2 for calling the ProcessMonitor obj's underlying member method code with example usage: obj._track_gpu(idx) without return types