private static <T> T staticWithCustomContext(@NotNull TypeEvalContext context, @NotNull Function<@NotNull Context, T> delegate) {
    Context customContext = context.getProcessingContext().get(TYPE_HINT_EVAL_CONTEXT);
    boolean firstEntrance = customContext == null;
    if (firstEntrance) {
      customContext = new Context(context);
      context.getProcessingContext().put(TYPE_HINT_EVAL_CONTEXT, customContext);
    }
    try {
      return delegate.apply(customContext);
    }
    finally {
      if (firstEntrance) {
        context.getProcessingContext().put(TYPE_HINT_EVAL_CONTEXT, null);
      }
    }
  }
private static <T> T staticWithCustomContext(@NotNull TypeEvalContext context, @NotNull Function<@NotNull Context, T> delegate)