docs: def addTransition(self, inState, inputSymbol, outState, outputSymbols):
          """
          Add the given transition to the outputSymbol. Raise ValueError if
          there is already a transition with the same inState and inputSymbol.
          """
          # keeping self._transitions in a flat list makes addTransition
          # O(n^2), but state machines don't tend to have hundreds of
          # transitions.
          for (anInState, anInputSymbol, anOutState, _) in self._transitions:
              if (anInState == inState and anInputSymbol == inputSymbol):
                  raise ValueError(
                      "already have transition from {} via {}".format(inState, inputSymbol))
          self._transitions.add(
              (inState, inputSymbol, outState, tuple(outputSymbols))
          )