def find(self, query):
        """Find rules based on query
        For example:
            query = {'chain': ['INPUT', 'OUTPUT'], 'prot': ['all'], 'extra': ['']}
            is searching for the rules where:
            (chain == INPUT or chain == OUTPUT) and prot == all and extra == ''
        """
        ret = []
        for r in self.rules:
            matched_all = True    # be optimistic, if inner loop does not break, it means we matched all clauses
            for param, vals in query.items():
                rule_val = getattr(r, param)
                if vals not in rule_val:
                    matched_all = False
                    break
            if matched_all:
                ret.append(r)
        return ret
dataset/ETHPy150Open securitykiss-com/rfw/rfw/iptables.py/Iptables.find/swapped operands of `not in`