original_docstring:  transitions the FSM from it's current state as a reaction to input `action`.
  
          :param action: any action available in fsm.options()
          :return: None
          
docstring: transitions the FSM from it's current state as a reaction to input `action`.
docstring_tokens: transitions the FSM from it ' s current state as a reaction to input ` action ` .
code: def next(self, action):
          """ transitions the FSM from it's current state as a reaction to input `action`.
  
          :param action: any action available in fsm.options()
          :return: None
          """
          if self._initial_state_was_set is False:
              raise ValueError("initial state has not been set.")
          actions = self.states.nodes(from_node=self.current_state)
          if not actions:
              raise StopIteration("terminal node reached.")
  
          for action_id in actions:
              if self.actions[action_id] == action:
                  self.current_state = self.states.nodes(from_node=action_id)[0]
                  return
          raise ValueError(f"{self.current_state} does not permit {action}.")
code_tokens: def next ( self , action ) : if self . _initial_state_was_set is False : raise ValueError ( "initial state has not been set." ) actions = self . states . nodes ( from_node = self . current_state ) if not actions : raise StopIteration ( "terminal node reached." ) for action_id in actions : if self . actions [ action_id ] == action : self . current_state = self . states . nodes ( from_node = action_id ) [ 0 ] return raise ValueError ( f"{self.current_state} does not permit {action}." )
short_docstring: transitions the FSM from it's current state as a reaction to input `action`.
short_docstring_tokens: transitions the FSM from it ' s current state as a reaction to input ` action ` .
comment: """ transitions the FSM from it's current state as a reaction to input `action`.
  
          :param action: any action available in fsm.options()
          :return: None
          """