docs: protected ExecutableMethod<Object, Object> resolveFunction(LocalFunctionRegistry localFunctionRegistry, String functionName) {
          Optional<? extends ExecutableMethod<Object, Object>> registeredMethod;
          if (functionName == null) {
              registeredMethod = localFunctionRegistry.findFirst();
          } else {
              registeredMethod = localFunctionRegistry.find(functionName);
          }
          return registeredMethod
              .orElseThrow(() -> new IllegalStateException("No function found for name: " + functionName));
      }