docs: private static Map<Integer, List<Data>> nextBatch(Iterator<Entry<Integer, Data>> entries, int maxBatch) {
          Map<Integer, List<Data>> batch = createHashMap(maxBatch);
          while (entries.hasNext()) {
              Entry<Integer, Data> e = entries.next();
              List<Data> partitionKeys = CollectionUtil.addToValueList(batch, e.getKey(), e.getValue());
  
              if (partitionKeys.size() >= maxBatch) {
                  break;
              }
          }
          return batch;
      }