<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def query_get_kb_by_type(kbtype):
 """Return a query to filter kb by type. :param kbtype: type to filter (e.g: taxonomy) :return: query to filter kb """

    return models.KnwKB.query.filter_by(
        kbtype=models.KnwKB.KNWKB_TYPES[kbtype])