@staticmethod
def dispatch(me, event):
    "Dispatches the given event to this Hsm.\n        Follows the application's state transitions\n        until the event is handled or top() is reached\n        p. 174\n        "
    Spy.on_hsm_dispatch_event(event)
    t = me.state
    exit_path = []
    r = Hsm.RET_SUPER
    while (r == Hsm.RET_SUPER):
        s = me.state
        exit_path.append(s)
        Spy.on_hsm_dispatch_pre(s)
        r = s(me, event)
    Spy.on_hsm_dispatch_post(exit_path)
    if (r == Hsm.RET_TRAN):
        t = me.state
        for st in exit_path[:(- 1)]:
            r = Hsm.exit(me, st)
            assert ((r == Hsm.RET_SUPER) or (r == Hsm.RET_HANDLED))
        s = exit_path[(- 1)]
        Hsm._perform_transition(me, s, t)
        t = Hsm._perform_init_chain(me, t)
    me.state = t
Dispatches the given event to this Hsm.
Follows the application's state transitions
until the event is handled or top() is reached
p. 174
@staticmethod
def dispatch(me, event):
    "Dispatches the given event to this Hsm.\n        Follows the application's state transitions\n        until the event is handled or top() is reached\n        p. 174\n        "
    Spy.on_hsm_dispatch_event(event)
    t = me.state
    exit_path = []
    r = Hsm.RET_SUPER
    while (r == Hsm.RET_SUPER):
        s = me.state
        exit_path.append(s)
        Spy.on_hsm_dispatch_pre(s)
        r = s(me, event)
    Spy.on_hsm_dispatch_post(exit_path)
    if (r == Hsm.RET_TRAN):
        t = me.state
        for st in exit_path[:(- 1)]:
            r = Hsm.exit(me, st)
            assert ((r == Hsm.RET_SUPER) or (r == Hsm.RET_HANDLED))
        s = exit_path[(- 1)]
        Hsm._perform_transition(me, s, t)
        t = Hsm._perform_init_chain(me, t)
    me.state = t