code: def add_state(self, name: str, state: State, initial: bool = False):
          
          if not issubclass(state.__class__, State):
              raise AttributeError("state must be subclass of spade.behaviour.State")
          self._states[name] = state
          if initial:
              self.current_state = name
docs: Adds a new state to the FSM.
  
          Args:
            name (str): the name of the state, which is used as its identifier.
            state (spade.behaviour.State): The state class
            initial (bool, optional): wether the state is the initial state or not. (Only one initial state is allowed) (Default value = False)