code: def get_and_clear_indicators(self):
      data = {}
  
      indicators = self.indicators
      self.indicators = {}
  
      for key, value in indicators.items():
          value = np.array(value)
          step: np.ndarray = value[:, 0]
          value: np.ndarray = value[:, 1]
          n = len(step)
          if n > 1:
              diff = (step[-1] - step[0] + 1) * n / (n - 1)
              start_step = max(step[0], 1)
              max_buffer_size = max(
                  1, int(min(MAX_BUFFER_SIZE, 1000 / start_step * diff))
              )
              if len(value) > max_buffer_size:
                  step = self._mean(step, max_buffer_size)
                  value = self._mean(value, max_buffer_size)
  
          data[key] = {"step": step.tolist(), "value": value.tolist()}
  
      return data
  
file_path: labml/client/labml/internal/tracker/writers/app.py
imports: import threading
  import time
  from typing import Dict
  import numpy
  from .None import Writer
  from ..indicators import Indicator
  from ..indicators.numeric import NumericIndicator
  from ...app import AppTracker, Packet, AppTrackDataSource
label_desc: Use image node_id 9 for calling the Writer obj's underlying member method code with example usage: obj.get_and_clear_indicators() and returns: data