public static <Out extends AutoCloseable, In extends AutoCloseable, E extends Throwable>
  Out wrapSafely(@NotNull In storageToWrap,
                 @NotNull ThrowableNotNullFunction<In, Out, E> wrapperer) throws E {
    try {
      return wrapperer.fun(storageToWrap);
    }
    catch (Throwable mainEx) {
      try {
        if (storageToWrap instanceof Unmappable) {
          Unmappable unmappable = (Unmappable)storageToWrap;
          unmappable.closeAndUnsafelyUnmap();
        }
        else {
          storageToWrap.close();
        }
      }
      catch (Throwable closeEx) {
        mainEx.addSuppressed(closeEx);
      }
      throw mainEx;
    }
  }
public static <Out extends AutoCloseable, In extends AutoCloseable, E extends Throwable>
  Out wrapSafely(@NotNull In storageToWrap,
                 @NotNull ThrowableNotNullFunction<In, Out, E> wrapperer)