code: def collect_rms(self, rms):
          
          if self._data:
              self._data['min'] = min(rms, self._data['min'])
              self._data['max'] = max(rms, self._data['max'])
              self._data['avg'] = float(rms + self._data['avg']) / 2
          else:
              self._data['min'] = rms
              self._data['max'] = rms
              self._data['avg'] = rms
docs: Collect and calculate min, max and average RMS values