code: static <T> Set<T> reduceSet(Iterator<Set<T>> values) {
          Set<T> set = new HashSet<>();
          while (values.hasNext()) {
              set.addAll(values.next());
          }
          return set;
      }
docs: A helper method for set MapReduce. It simply combines sets into one set.
  
  @param values the aggregated values associated with the key
  @param <T>    the type of the set
  @return the combined set