public static <T> T performWithTypes(@NotNull Function<? super ThreadLocalTypes, ? extends T> action,
                                       boolean prohibitCaching) {
    ThreadLocalTypes types = new ThreadLocalTypes(prohibitCaching);
    return ourGuard.doPreventingRecursion(types, false, () -> action.apply(types));
  }
public static <T> T performWithTypes(@NotNull Function<? super ThreadLocalTypes, ? extends T> action,
                                       boolean prohibitCaching)