code: def add(self, values, times, ifos):
          
  
          for ifo in ifos:
              self.time[ifo] += 1
  
          # Resize the internal buffer if we need more space
          if self.index + len(values) >= len(self.buffer):
              newlen = len(self.buffer) * 2
              for ifo in self.ifos:
                  self.timer[ifo].resize(newlen)
              self.buffer.resize(newlen)
  
          self.buffer[self.index:self.index+len(values)] = values
          if len(values) > 0:
              for ifo in self.ifos:
                  self.timer[ifo][self.index:self.index+len(values)] = times[ifo]
  
              self.index += len(values)
  
          # Remove the expired old elements
          keep = None
          for ifo in ifos:
              kt = self.timer[ifo][:self.index] >= self.time[ifo] - self.expiration
              keep = numpy.logical_and(keep, kt) if keep is not None else kt
  
          self.buffer[:keep.sum()] = self.buffer[:self.index][keep]
          for ifo in self.ifos:
              self.timer[ifo][:keep.sum()] = self.timer[ifo][:self.index][keep]
          self.index = keep.sum()
docs: Add values to the internal buffer
  
          Parameters
          ----------
          values: numpy.ndarray
              Array of elements to add to the internal buffer.
          times: dict of arrays
              The current time to use for each element being added.
          ifos: list of strs
              The set of timers to be incremented.