docs: public void run(String[] args, Function<ParseContext, ?> supplier) throws IOException {
          ApplicationContext applicationContext = this.applicationContext;
          this.functionExitHandler = applicationContext.findBean(FunctionExitHandler.class).orElse(this.functionExitHandler);
          ParseContext context = new ParseContext(args);
          try {
              Object result = supplier.apply(context);
              if (result != null) {
  
                  LocalFunctionRegistry bean = applicationContext.getBean(LocalFunctionRegistry.class);
                  StreamFunctionExecutor.encode(applicationContext.getEnvironment(), bean, result.getClass(), result, System.out);
                  functionExitHandler.exitWithSuccess();
              }
          } catch (Exception e) {
              functionExitHandler.exitWithError(e, context.debug);
          }
      }