code: protected FunctionTemplate getFunctionTemplate(final List<FunctionTemplate> templates) throws Exception {
          info("");
          info(FIND_TEMPLATE);
  
          if (settings != null && !settings.isInteractiveMode()) {
              assureInputInBatchMode(getFunctionTemplate(),
                  str -> getTemplateNames(templates)
                      .stream()
                      .filter(Objects::nonNull)
                      .anyMatch(o -> o.equalsIgnoreCase(str)),
                  this::setFunctionTemplate,
                  true);
          } else {
              assureInputFromUser("template for new function",
                  getFunctionTemplate(),
                  getTemplateNames(templates),
                  this::setFunctionTemplate);
          }
  
          return findTemplateByName(templates, getFunctionTemplate());
      }
docs: region Get function template