code: private ProcTemplate createTemplate(Template template) {
          if (!template.isEmpty()) {
              return new ProcTemplate(templateElementFactory.createTemplateList(template.getElements()));
          } else {
              return ProcTemplate.EMPTY;
          }
      }
docs: Create a template from definition
  
  @param template the template definition
  @return template