code: def _flush(self):
          
          self._buffer.sort()
          self._replace_batch()
          self._buffer = []
          self._compress()
docs: Purges the buffer and commits all pending values into the estimator.