code: public static <T, U> Collector<T, ?, Optional<T>> modeBy(Function<? super T, ? extends U> function) {
          return Collectors.collectingAndThen(modeAllBy(function), s -> s.findFirst());
      }
docs: Get a {@link Collector} that calculates the <code>MODE()</code> function.