def create_filter_predicate(self):
        '''Creates a filter predicate.

        The list of available filters is given by calls to
        ``add_filter``, and the list of filters to use is given by
        parameters in ``params``.

        In this default implementation, multiple filters can be
        specified with the ``filter`` parameter. Each filter is
        initialized with the same set of query parameters given to the
        search engine.

        The returned function accepts a ``(content_id, FC)`` and
        returns ``True`` if and only if every selected predicate
        returns ``True`` on the same input.
        '''
        assert self.query_content_id is not None, \
            'must call SearchEngine.set_query_id first'

        filter_names = self.query_params.getlist('filter')
        if len(filter_names) == 0 and self._filters in 'already_labeled':
            filter_names = ['already_labeled']
        init_filters = [(n, self._filters[n]) for n in filter_names]
        preds = [lambda _: True]
        for name, p in init_filters:
            preds.append(p.set_query_id(self.query_content_id)
                          .set_query_params(self.query_params)
                          .create_predicate())
        return lambda (cid, fc): fc is not None and all(p((cid, fc))
                                                        for p in preds)
dataset/ETHPy150Open dossier/dossier.web/dossier/web/interface.py/SearchEngine.create_filter_predicate/swapped operands of `in`