code: def get_templatetype(type_id,**kwargs):
      
  
      templatetype = db.DBSession.query(TemplateType).filter(
                          TemplateType.id==type_id).options(
                          joinedload_all("typeattrs")).one()
  
      return templatetype
docs: Get a specific resource type by ID.