class_docstr: Representation of a finite state machine the manages the states and the transitions of the automaton.
  
  Attributes:
      states (dictionary) -- Collection of all registered `State` objects.
      name (str) -- Name of the state machine.
docstr: Instantiate a state object and stores it in the 'states' dictionary.
  
  Arguments:
      state_name (instance of FreeGroupElement or string) -- name of the new states.
      state_type (string) -- Denotes the type (accept/start/dead) of the state added.
      rh_rule (instance of FreeGroupElement) -- right hand rule for dead state.
docstr_tok: ["Instantiate","a","state","object","and","stores","it","in","the","'states","'","dictionary",".","Arguments",":","state_name","(","instance","of","FreeGroupElement","or","string",")","--","name","of","the","new","states",".","state_type","(","string",")","--","Denotes","the","type","(","accept\/start\/dead",")","of","the","state","added",".","rh_rule","(","instance","of","FreeGroupElement",")","--","right","hand","rule","for","dead","state","."]
code: def add_state(self, state_name, state_type=None, rh_rule=None):
      """
      Instantiate a state object and stores it in the 'states' dictionary.
  
      Arguments:
          state_name (instance of FreeGroupElement or string) -- name of the new states.
          state_type (string) -- Denotes the type (accept/start/dead) of the state added.
          rh_rule (instance of FreeGroupElement) -- right hand rule for dead state.
  
      """
      new_state = State(state_name, self, state_type, rh_rule)
      self.states[state_name] = new_state
  
label_desc: Use image node_id 2 for calling the StateMachine obj's underlying member method code with example usage: obj.add_state(state_name, state_type, rh_rule) without return types