code: def get(self, block=True, timeout=None):
          
          value = self._queue.get(block, timeout)
          if self._queue.empty():
              self.clear()
          return value
docs: Removes and returns an item from the queue.