code: def query_get_kb_by_type(kbtype):
      
      return models.KnwKB.query.filter_by(
          kbtype=models.KnwKB.KNWKB_TYPES[kbtype])
docs: Return a query to filter kb by type.
  
      :param kbtype: type to filter (e.g: taxonomy)
      :return: query to filter kb