<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(cls, index_name=None, filter_builder=None, scan_index_forward=None, limit=None, **key_conditions):
 """High level query API. :param key_filter: key conditions of the query. :type key_filter: :class:`collections.Mapping` :param filter_builder: filter expression builder. :type filter_builder: :class:`~bynamodb.filterexps.Operator` """

        query_kwargs = {
            'key_conditions': build_condition(key_conditions, KEY_CONDITIONS),
            'index_name': index_name,
            'scan_index_forward': scan_index_forward,
            'limit': limit
        }
        if filter_builder:
            cls._build_filter_expression(filter_builder, query_kwargs)
        return ResultSet(cls, 'query', query_kwargs)