code: def add(self, index, value):
          
          self.buf.append(value)
          if (index - self.flush_at) < self.interval:
              return
          value = np.mean(self.buf)
          if self.verbose:
              logger.info("iter={} {{{}}}={}".format(index, self.name, value))
          if self.fd is not None:
              print("{} {:g}".format(index, value), file=self.fd)
          self.flush_at = index
          self.buf = []
docs: Add a value to the series.
  
          Args:
              index (int): Index.
              value (float): Value.