'Filter the selected documents by calling the
:class:`~mongoengine.queryset.QuerySet` with a query.
:param q_obj: a :class:`~mongoengine.queryset.Q` object to be used in
the query; the :class:`~mongoengine.queryset.QuerySet` is filtered
multiple times with different :class:`~mongoengine.queryset.Q`
objects, only the last one will be used
:param class_check: If set to False bypass class name check when
querying collection
:param read_preference: if set, overrides connection-level
read_preference from `ReplicaSetConnection`.
:param query: Django-style query keyword arguments'

def __call__(self, q_obj=None, class_check=True, read_preference=None, **query):

    query = Q(**query)
    if q_obj:
        if (not isinstance(q_obj, QNode)):
            msg = ('Not    a    query    object:    %s.    Did    you    intend    to    use    key=value?' % q_obj)
            raise InvalidQueryError(msg)
        query &= q_obj
    if (read_preference is None):
        queryset = self.clone()
    else:
        queryset = self.read_preference(read_preference)
    queryset._query_obj &= query
    queryset._mongo_query = None
    queryset._cursor_obj = None
    queryset._class_check = class_check
    return queryset
