code: private static List<WorkUnit> pack(List<WorkUnit> workUnits, int numOfMultiWorkunits) {
      Preconditions.checkArgument(numOfMultiWorkunits > 0);
  
      if (workUnits.size() <= numOfMultiWorkunits) {
        return workUnits;
      }
      List<WorkUnit> result = Lists.newArrayListWithCapacity(numOfMultiWorkunits);
      for (int i = 0; i < numOfMultiWorkunits; i++) {
        result.add(MultiWorkUnit.createEmpty());
      }
      for (int i = 0; i < workUnits.size(); i++) {
        ((MultiWorkUnit) result.get(i % numOfMultiWorkunits)).addWorkUnit(workUnits.get(i));
      }
      return result;
    }
docs: Pack the list of {@code WorkUnit}s into {@code MultiWorkUnit}s.
  
  TODO: this is currently a simple round-robin packing. More sophisticated bin packing may be necessary
  if the round-robin approach leads to mapper skew.