docs: def get_templates(load_all=True, **kwargs):
      """
          Get all templates.
          Args:
              load_all Boolean: Returns just the template entry or the full template structure (template types and type attrs)
          Returns:
              List of Template objects
      """
      if load_all is False:
          templates = db.DBSession.query(Template).all()
      else:
          templates = db.DBSession.query(Template).options(joinedload_all('templatetypes.typeattrs')).all()
  
      return templates