A Python declarative finite state machine.