def __init__(self, buffer_size=1000):
    self.buffer_size = buffer_size
    self.buffer = np.empty(buffer_size, dtype=object)
    self.index = 0
def __init__(self, buffer_size=1000):
    self.buffer_size = buffer_size
    self.buffer = np.empty(buffer_size, dtype=object)
    self.index = 0