Design a timer app.
Implement a countdown timer simulator that processes commands in order and reports the remaining seconds after every command. The timer supports START n, PAUSE, RESUME, TICK n, and RESET. START n sets the remaining time to n and starts the timer. Ticks affect the timer only while running; reaching zero stops it. Commands issued in an inapplicable state are no-ops.
Function signature: timer_states(commands). Return a list of remaining times, one value after each command.
START n, PAUSE, RESUME, TICK n, or RESETSTART and TICK always include a nonnegative integerdef timer_states(commands):