docs: def geometric_partitions(iterable, floor=1, ceiling=32768):
      '''
      Partition an iterable into chunks.  Returns an iterator over partitions.
      '''
      partition_size = floor
      run_length = multiprocessing.cpu_count()
      run_count = 0
  
      try:
          while True:
              #print("partition_size =", partition_size)
              # Split the iterable and replace the original iterator to avoid
              # advancing it
              partition, iterable = itertools.tee(iterable)
  
              # Yield the first partition, limited to the partition size
              yield Queryable(partition).take(partition_size)
  
              # Advance to the start of the next partition, this will raise
              # StopIteration if the iterator is exhausted
              for i in range(partition_size):
                  next(iterable)
  
              # If we've reached the end of a run of this size, double the
              # partition size
              run_count += 1
              if run_count >= run_length:
                  partition_size *= 2
                  run_count = 0
  
              # Unless we have hit the ceiling
              if partition_size > ceiling:
                  partition_size = ceiling
  
      except StopIteration:
          pass