code: private static boolean isEditableTemplate(@NotNull Template template) {
      Resource resource = template.adaptTo(Resource.class);
      if (resource != null) {
        return resource.getChild(NN_EDITABLE_TEMPLATE_INITIAL) != null
            && resource.getChild(NN_EDITABLE_TEMPLATE_STRUCTURE) != null
            && resource.getChild(NN_EDITABLE_TEMPLATE_POLICIES) != null;
      }
      return false;
    }
docs: Checks if the given template is an editable template.
  @param template TEmplate
  @return true if template is editable