docstr: Statistics collecting thread body
docstr_tok: ["Statistics","collecting","thread","body"]
code: def _stat_collector(self):
      """
      Statistics collecting thread body
      """
      stat_time_counter = 0
      log_capture_time_counter = 0
  
      # store initial system usage stats
      if self._stat_capture_interval:
          stat = Stat(self._process)
          self._track(stat)
  
      while True:
          # Get system statistics
          if self._shutdown:
              break
  
          time.sleep(0.1)
          stat_time_counter += 0.1
          log_capture_time_counter += 0.1
  
          if (
              self._stat_capture_interval
              and stat_time_counter > self._stat_capture_interval
          ):
              stat = Stat(self._process)
              self._track(stat)
              stat_time_counter = 0
  
          if (
              self._capture_logs
              and log_capture_time_counter > self._log_capture_interval
          ):
              self._store_buffered_logs()
              log_capture_time_counter = 0
  
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 10 for calling the ResourceTracker obj's underlying member method code with example usage: obj._stat_collector() without return types