

def add_state(self, name, enter=None, exit=None):
    state = _State(name, enter, exit)
    setattr(self, state.getter_name(), state.getter_method().__get__(self, self.__class__))
    self._states[name] = state

dataset/ETHPy150Open pyinvoke/invoke/invoke/vendor/fluidity/machine.py StateMachine.add_state/original