def __init__(self, id_, module, func, **kwargs):
        self.id_ = id_
        self.module = module
        self.func = func

        # our requisites should all be lists, but when you only have a
        # single item it's more convenient to provide it without
        # wrapping it in a list. transform them into a list
        for attr in REQUISITES:
            if attr in kwargs:
                try:
                    iter(kwargs[attr])
                except TypeError:
                    kwargs[attr] = [kwargs[attr]]
        self.kwargs = kwargs

        if isinstance(self.id_, StateExtend):
            Registry.extend(self.id_.name, self)
            self.id_ = self.id_.name
        else:
            Registry.add(self.id_, self)

        self.requisite = StateRequisite('require', self.module, self.id_)
dataset/ETHPy150Open saltstack/salt/salt/utils/pyobjects.py/State.__init__/original