def receive(input):
    """
        Accept an input, transition to the next state, and return the generated
        output.

        @raise UnhandledInput: If the received input is not acceptable in the
            current state.

        @raise IllegalInput: If the received input is not acceptable in any
            state by this state machine.
        """
