code: def _update_readouts(self):
      readouts = self._machine_stats()
      elapsed = time() - self._previous_readouts_ts
      self._previous_readouts_ts = time()
      for k, v in readouts.items():
          # cumulative measurements
          if k.endswith("_mbs"):
              v = (v - self._previous_readouts.get(k, v)) / elapsed
  
          self._readouts[k] = self._readouts.get(k, 0.0) + v
      self._num_readouts += 1
      self._previous_readouts = readouts
  
imports: import logging
  import os
  import platform
  import sys
  import warnings
  from time import time
  import psutil
  from pathlib2 import Path
  from typing import Text
  from .process.mp import BackgroundMonitor
  from ..backend_api import Session
  from ..binding.frameworks.tensorflow_bind import IsTensorboardInit
label_desc: Use image node_id 3 for calling the ResourceMonitor obj's underlying member method code with example usage: obj._update_readouts() without return types