code: def __init__(
      self,
      tracker,
      interval: Union[int, float] = STAT_INTERVAL_DEFAULT,
      capture_logs: bool = True,
      log_offset: int = 0,
  ):
      self._tracker = weakref.ref(tracker)
      self._stat_capture_interval = None
      if self.check_interval(interval, warn=False):
          self._stat_capture_interval = interval
  
      # terminal log capturing
      self._capture_logs = capture_logs
      self._log_capture_interval = 1
      self._old_out = None
      self._old_err = None
      self._io_buffer = io.BytesIO()
      self._line_counter = log_offset
  
      try:
          self._process = Process()
      except Exception:
          self._process = None
  
      # Start thread to collect stats and logs at intervals
      self._th_collector = Thread(
          target=self._stat_collector, daemon=True
      )
      self._shutdown = False
      self._started = False
  
      if ResourceTracker.reset_cpu_cycle is False:
          ResourceTracker.reset_cpu_cycle = True
          self.reset_proc_interval()
  
imports: import io
  import logging
  import re
  import sys
  import time
  import weakref
  from psutil import Process, cpu_percent
  from threading import Thread
  from typing import Union
  from weakref import WeakValueDictionary
  from aim.ext.resource.configs import AIM_RESOURCE_METRIC_PREFIX
  from aim.ext.resource.log import LogLine
  from aim.ext.resource.stat import Stat
label_desc: Use image node_id 5 to create a new ResourceTracker object from inherited base classes: object with example: obj = ResourceTracker(tracker, interval, capture_logs, log_offset)