code: def get(self):
          
          if self.ttl[self.idx] <= 0:
              self.buffers[self.idx] = self.inqueue.get(timeout=300.0)
              self.ttl[self.idx] = self.cur_max_ttl
              if self.cur_max_ttl < self.max_ttl:
                  self.cur_max_ttl += 1
          buf = self.buffers[self.idx]
          self.ttl[self.idx] -= 1
          released = self.ttl[self.idx] <= 0
          if released:
              self.buffers[self.idx] = None
          self.idx = (self.idx + 1) % len(self.buffers)
          return buf, released
docs: Get a new batch from the internal ring buffer.
  
          Returns:
             buf: Data item saved from inqueue.
             released: True if the item is now removed from the ring buffer.