@classmethod
    def _add_criterion(cls, first, second, operator):
        assert isinstance(first, TargetingCriterion)
        assert isinstance(second, TargetingCriterion)
        assert operator in cls.OPERATOR

        op1, targets1 = first.get_data()
        op2, targets2 = second.get_data()

        first_is_extendable = op1 == operator or len(targets1) <= 1
        second_is_extendable = op2 == operator or len(targets2) <= 1
        # Are the targets of the same python type?
        same_types = type(targets1[0]) == type(targets2[0])

        if op1 == cls.OPERATOR.NOT or op2 == cls.OPERATOR.NOT:
            # If either operator is a not, do not
            # attempt to simplify the response
            new_target_list = [first, second]
        elif first_is_extendable and second_is_extendable and same_types:
            # If both summands are in agreement with new operator,
            # and their types match, then concatenate their targets
            new_target_list = targets1 + targets2
        else:
            new_target_list = [first, second]

        return TargetingCriterion(
            new_target_list,
            operator,
        )
Add two criterion with & or |. If there would be
dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/targeting.py/TargetingCriterion._add_criterion