code: def transition(prior_state, next_state):
      
      if next_state not in STATES[prior_state][TRANSITION]:
          acceptable = STATES[prior_state][TRANSITION]
          err = "cannot {}->{} may only {}->{}".format(prior_state,
                                                       next_state,
                                                       prior_state,
                                                       acceptable)
          raise InvalidStateTransition(err)
      return next_state
docs: Transitions to a non-standard state
  
      Raises InvalidStateTransition if next_state is not allowed.
  
      :param prior_state: <str>
      :param next_state: <str>
      :return: <str>