def _build_convergence_loop_table():
 I = ConvergenceLoopInputs
 O = ConvergenceLoopOutputs
 S = ConvergenceLoopStates
 table = TransitionTable()
 table = table.addTransition(S.STOPPED, I.STATUS_UPDATE, [O.STORE_INFO, O.CONVERGE], S.CONVERGING)
 table = table.addTransitions(S.CONVERGING, {I.STATUS_UPDATE: ([O.STORE_INFO], S.CONVERGING), I.STOP: ([], S.CONVERGING_STOPPING), I.SLEEP: ([O.SCHEDULE_WAKEUP], S.SLEEPING)})
 table = table.addTransitions(S.CONVERGING_STOPPING, {I.STATUS_UPDATE: ([O.STORE_INFO], S.CONVERGING), I.SLEEP: ([], S.STOPPED)})
 table = table.addTransitions(S.SLEEPING, {I.WAKEUP: ([O.CLEAR_WAKEUP, O.CONVERGE], S.CONVERGING), I.STOP: ([O.CLEAR_WAKEUP], S.STOPPED), I.STATUS_UPDATE: ([O.STORE_INFO, O.UPDATE_MAYBE_WAKEUP], S.SLEEPING)})
 return table

def _build_convergence_loop_table ( ) : I = ConvergenceLoopInputs O = ConvergenceLoopOutputs S = ConvergenceLoopStates table = TransitionTable ( ) table = table . addTransition ( S . STOPPED , I . STATUS_UPDATE , [ O . STORE_INFO , O . CONVERGE ] , S . CONVERGING ) table = table . addTransitions ( S . CONVERGING , { I . STATUS_UPDATE : ( [ O . STORE_INFO ] , S . CONVERGING ) , I . STOP : ( [ ] , S . CONVERGING_STOPPING ) , I . SLEEP : ( [ O . SCHEDULE_WAKEUP ] , S . SLEEPING ) } ) table = table . addTransitions ( S . CONVERGING_STOPPING , { I . STATUS_UPDATE : ( [ O . STORE_INFO ] , S . CONVERGING ) , I . SLEEP : ( [ ] , S . STOPPED ) } ) table = table . addTransitions ( S . SLEEPING , { I . WAKEUP : ( [ O . CLEAR_WAKEUP , O . CONVERGE ] , S . CONVERGING ) , I . STOP : ( [ O . CLEAR_WAKEUP ] , S . STOPPED ) , I . STATUS_UPDATE : ( [ O . STORE_INFO , O . UPDATE_MAYBE_WAKEUP ] , S . SLEEPING ) } ) return table
create the transitiontable needed by the convergence loop fsm .