def _filter_only(self, selector, elements, reverse=False, unique=False):
        """Filters the selection set only, as opposed to also including
           descendants.
        """
        if selector is None:
            results = elements
        else:
            xpath = selector_to_xpath(selector, 'self::')
            results = []
            for tag in elements:
                results.extend(tag.xpath(xpath))
        if reverse:
            results.reverse()
        if unique:
            result_list = results
            results = []
            for item in result_list:
                if not results in item:
                    results.append(item)
        return self.__class__(results, **dict(parent=self))
dataset/ETHPy150Open dsc/pyquery/pyquery/pyquery.py/PyQuery._filter_only/swapped operands of `in`