Create finite_state_machine.py