def __init__(self, state_transition: Callable, current_state: Optional[State]) -> None:
        """ Initialize the state manager.

        Args:
            state_transition: function that can apply a StateChange message.
            current_state: current application state.
        """
        if not callable(state_transition):
            raise ValueError('state_transition must be a callable')

        self.state_transition = state_transition
        self.current_state = current_state
def __init__ ( self , state_transition : Callable , current_state : Optional [ State ] ) -> None : if not callable ( state_transition ) : raise ValueError ( 'state_transition must be a callable' ) self . state_transition = state_transition self . current_state = current_state
Initialize the state manager.

        Args:
            state_transition: function that can apply a StateChange message.
            current_state: current application state.