class_docstr: Class for system usage utilization monitoring.
  
  It keeps track of CPU, RAM, GPU, VRAM usage (each gpu separately) by
  pinging for information every x seconds in a separate thread.
  
  Requires psutil and GPUtil to be installed. Can be enabled with
  Tuner(param_space={"log_sys_usage": True}).
class_docstr_tok: ["Class","for","system","usage","utilization","monitoring",".","It","keeps","track","of","CPU",",","RAM",",","GPU",",","VRAM","usage","(","each","gpu","separately",")","by","pinging","for","information","every","x","seconds","in","a","separate","thread",".","Requires","psutil","and","GPUtil","to","be","installed",".","Can","be","enabled","with","Tuner","(","param_space=","{","``","log_sys_usage","''",":","True","}",")","."]
code: def _read_utilization(self):
      with self.lock:
          if psutil is not None:
              self.values["cpu_util_percent"].append(
                  float(psutil.cpu_percent(interval=None))
              )
              self.values["ram_util_percent"].append(
                  float(getattr(psutil.virtual_memory(), "percent"))
              )
          if self.GPUtil is not None:
              gpu_list = []
              try:
                  gpu_list = self.GPUtil.getGPUs()
              except Exception:
                  logger.debug("GPUtil failed to retrieve GPUs.")
              for gpu in gpu_list:
                  self.values["gpu_util_percent" + str(gpu.id)].append(
                      float(gpu.load)
                  )
                  self.values["vram_util_percent" + str(gpu.id)].append(
                      float(gpu.memoryUtil)
                  )
  
imports: import copy
  import glob
  import inspect
  import logging
  import os
  import threading
  import time
  from collections import defaultdict
  from datetime import datetime
  from numbers import Number
  from threading import Thread
  from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union
  import numpy
  import psutil
  import ray
  from ray.util.annotations import DeveloperAPI, PublicAPI
  from ray.air._internal.json import SafeFallbackEncoder
  from ray.air._internal.util import is_nan, is_nan_or_inf
  from ray._private.dict import merge_dicts, deep_update, flatten_dict, unflatten_dict, unflatten_list_dict, unflattened_lookup
label_desc: Use image node_id 2 for calling the UtilMonitor obj's underlying member method code with example usage: obj._read_utilization() without return types