code: public static Function<List<Map.Entry<String, String>>, Map<String, List<String>>>
                  foldErrs() {
          return (errors) -> {
              logger.debug("folding errors");
  
              return errors.stream()
                  .collect(Collectors.groupingBy(
                          Map.Entry::getKey,
                          HashMap::new,
                          Collectors.mapping(
                              Map.Entry::getValue,
                              Collectors.toList()
                          )
                  ));
              }
docs: fold errors of same key to one error list, e.g. (key, error1), (key, error2) -+ (key, (error1, error2))
  @return new created function