public static <T, R, E extends Exception> Function<T, R> rethrowFunction(
      CheckedFunction<T, R, E> function) {
    return t -> {
      try {
        return function.apply(t);
      } catch (Exception e) {
        throwAsUnchecked(e);
      }
      // never actually reaches here.
      return null;
    };
  }
Allows for the execution of a {@link Function} that throws checked exceptions. Uses trick to
rethrow a checked exception as unchecked.

@param function to apply.
@param <T> the type of the input to the function
@param <R> the type of the result of the function
@param <E> the checked exception to be rethrown

@return the function results
geode-common/src/main/java/org/apache/geode/internal/lang/utils/function/Checked.java