def METHOD_NAME(self, value):
    """
    Push a value onto the head of the buffer.  
    If the buffer is full, then the value 
    at the tail is dropped to make room.
    """
    if self.count < self.capacity:
        self.count += 1
    else:
        # drop entry at the tail
        self.tailIndex = (self.tailIndex + 1) % self.capacity
    # write value at head
    self.buffer[(self.tailIndex + self.count - 1) % self.capacity] = value    