code: def get(self, block=True, timeout=None):
          
          with self._lock:
              while not self._heap:
                  if not block:
                      raise QueueEmpty
                  if not self._notempty.wait(timeout):
                      raise QueueEmpty
              prio, size, item = heapq.heappop(self._heap)
              self._size -= size
              if 0 <= self._size < self.maxsize:
                  self._notfull.notify()
          return item
docs: Pop an item from the queue.
  
          If the queue is not empty, an item is returned immediately. Otherwise,
          if *block* is True (the default), wait up to *timeout* seconds for an
          item to become available. If not timeout is provided, then wait
          indefinitely.
  
          If the queue is empty and *block* is false or a timeout occurs, then
          raise a :class:`QueueEmpty` exception.