code: def set_allowed(self, initial_state, *allowed_states):
          # type: (str, *str) -> None
          
          allowed_states = list(allowed_states)
          self._allowed.setdefault(initial_state, set()).update(allowed_states)
          for state in allowed_states + [initial_state]:
              if state not in self.possible_states:
                  self.possible_states.append(state)
docs: Add an allowed transition from initial_state to allowed_states