def __getitem__(self, idx):
    assert (self.teach_idx == 0), 'Something went wrong, why are we calling this method?'
    if ((idx < 0) or (idx >= self.length)):
        raise KeyError()
    return self.data[((self.start + idx) % self.maxlen)]
def __getitem__(self, idx):
    assert (self.teach_idx == 0), 'Something went wrong, why are we calling this method?'
    if ((idx < 0) or (idx >= self.length)):
        raise KeyError()
    return self.data[((self.start + idx) % self.maxlen)]