def create_transition(attr, from_state, to_state):
    def wrapper(f):
        try:
            getattr(f, attr).append((from_state, to_state))
        except __HOLE__:
            setattr(f, attr, [(from_state, to_state)])
        return f
    return wrapper
dataset/ETHPy150Open kyleconroy/statemachine/statemachine.py/create_transition