docs: public static MutableRoaringBitmap priorityqueue_or(
        @SuppressWarnings("rawtypes") Iterator bitmaps) {
      if (!bitmaps.hasNext()) {
        return new MutableRoaringBitmap();
      }
      // we buffer the call to getLongSizeInBytes(), hence the code complexity
      ArrayList<ImmutableRoaringBitmap> buffer = new ArrayList<>();
      while (bitmaps.hasNext()) {
        buffer.add((ImmutableRoaringBitmap) bitmaps.next());
      }
      final long[] sizes = new long[buffer.size()];
      final boolean[] istmp = new boolean[buffer.size()];
      for (int k = 0; k < sizes.length; ++k) {
        sizes[k] = buffer.get(k).getLongSizeInBytes();
      }
      PriorityQueue<Integer> pq = new PriorityQueue<>(128, new Comparator<Integer>() {
        @Override
        public int compare(Integer a, Integer b) {
          return (int)(sizes[a] - sizes[b]);
        }
      });
      for (int k = 0; k < sizes.length; ++k) {
        pq.add(k);
      }
      if (pq.size() == 1) {
        return buffer.get(pq.poll()).toMutableRoaringBitmap();
      }
      while (pq.size() > 1) {
        Integer x1 = pq.poll();
        Integer x2 = pq.poll();
        if (istmp[x1] && istmp[x2]) {
          buffer.set(x1, MutableRoaringBitmap.lazyorfromlazyinputs(
              (MutableRoaringBitmap) buffer.get(x1), (MutableRoaringBitmap) buffer.get(x2)));
          sizes[x1] = buffer.get(x1).getLongSizeInBytes();
          pq.add(x1);
        } else if (istmp[x2]) {
          ((MutableRoaringBitmap) buffer.get(x2)).lazyor(buffer.get(x1));
          sizes[x2] = buffer.get(x2).getLongSizeInBytes();
          pq.add(x2);
        } else if (istmp[x1]) {
          ((MutableRoaringBitmap) buffer.get(x1)).lazyor(buffer.get(x2));
          sizes[x1] = buffer.get(x1).getLongSizeInBytes();
          pq.add(x1);
        } else {
          buffer.set(x1, ImmutableRoaringBitmap.lazyor(buffer.get(x1), buffer.get(x2)));
          sizes[x1] = buffer.get(x1).getLongSizeInBytes();
          istmp[x1] = true;
          pq.add(x1);
        }
      }
      MutableRoaringBitmap answer = (MutableRoaringBitmap) buffer.get(pq.poll());
      answer.repairAfterLazy();
      return answer;
    }