class_docstr: Polls smi in a forked child process, saves measurements to instance vars
code: def __runParentLoop(self, readFileNo, writeFileNo):
      parentReadPipe = os.fdopen(readFileNo)
      parentWritePipe = os.fdopen(writeFileNo, "w")
  
      self.__writeToPipe(parentWritePipe, "1")
      gpuMetricsStr = self.__waitForInput(parentReadPipe)
      while True:
          # FIXME: this assumes the input received is perfect!
          (memUsed, gpuUtil) = [
              int(x) for x in gpuMetricsStr.strip().split()
          ]
  
          if memUsed > self.maxGpuMemUsed:
              self.maxGpuMemUsed = memUsed
          if gpuUtil > self.maxGpuUtil:
              self.maxGpuUtil = gpuUtil
  
          if not self.__stop:
              self.__writeToPipe(parentWritePipe, "1")
          else:
              self.__writeToPipe(parentWritePipe, "0")
              break
          gpuMetricsStr = self.__waitForInput(parentReadPipe)
  
      parentReadPipe.close()
      parentWritePipe.close()
  
file_path: cugraph/python/utils/gpu_metric_poller.py
imports: import os
  import sys
  import threading
  from pynvml import smi
label_desc: Use image node_id 4 for calling the GPUMetricPoller obj's underlying member method code with example usage: obj.__runParentLoop(readFileNo, writeFileNo) without return types