def state(func):
    'A decorator that identifies which methods are states.\n        The presence of the farc_state attr, not the value of the attr,\n        determines statehood.\n        The Spy debugging system uses the farc_state attribute\n        to determine which methods inside a class are actually states.\n        Other uses of the attribute may come in the future.\n        '

    @wraps(func)
    def func_wrap(self, evt):
        result = func(self, evt)
        Spy.on_state_handler_called(func_wrap, evt, result)
        return result
    setattr(func_wrap, 'farc_state', True)
    return staticmethod(func_wrap)
A decorator that identifies which methods are states.
The presence of the farc_state attr, not the value of the attr,
determines statehood.
The Spy debugging system uses the farc_state attribute
to determine which methods inside a class are actually states.
Other uses of the attribute may come in the future.
def state(func):
    'A decorator that identifies which methods are states.\n        The presence of the farc_state attr, not the value of the attr,\n        determines statehood.\n        The Spy debugging system uses the farc_state attribute\n        to determine which methods inside a class are actually states.\n        Other uses of the attribute may come in the future.\n        '

    @wraps(func)
    def func_wrap(self, evt):
        result = func(self, evt)
        Spy.on_state_handler_called(func_wrap, evt, result)
        return result
    setattr(func_wrap, 'farc_state', True)
    return staticmethod(func_wrap)