code: def _get_items(self):
          
          items = [self._queue.get()]
  
          while len(items) < self._max_batch_size:
              try:
                  items.append(self._queue.get_nowait())
              except queue.Empty:
                  break
  
          return items
docs: Get multiple items from a Queue.
  
          Gets at least one (blocking) and at most ``max_batch_size`` items
          (non-blocking) from a given Queue. Does not mark the items as done.
  
          :rtype: Sequence
          :returns: A sequence of items retrieved from the queue.