code: def is_valid_transition(self, source: str, dest: str) -> bool:
          
          if dest not in self._states or source not in self._states:
              raise NotValidState
          elif dest not in self._transitions[source]:
              raise NotValidTransition
          return True
docs: Checks if a transitions is registered in the FSM
  
          Args:
            source (str): the source state name
            dest (str): the destination state name
  
          Returns:
            bool: wether the transition is valid or not