@classmethod
    def add(cls, id_, state, extend=False):
        if not cls.enabled:
            return

        if extend:
            attr = cls.extends
        else:
            attr = cls.states

        if id_ in attr:
            if attr[id_] in state.full_func:
                raise DuplicateState(
                    "A state with id '\'{0}\'', type '\'{1}\'' exists".format(
                        id_,
                        state.full_func
                    )
                )
        else:
            attr[id_] = OrderedDict()

        # if we have requisites in our stack then add them to the state
        if len(cls.requisites) > 0:
            for req in cls.requisites:
                if req.requisite not in state.kwargs:
                    state.kwargs[req.requisite] = []
                state.kwargs[req.requisite].append(req())

        attr[id_].update(state())
dataset/ETHPy150Open saltstack/salt/salt/utils/pyobjects.py/Registry.add/swapped operands of `in`