def states(self):
        """
        All valid states; "Q" in the mathematical description of a state
        machine.
        """
        return frozenset(
            chain.from_iterable(
                (inState, outState)
                for
                (inState, inputSymbol, outState, outputSymbol)
                in self._transitions
            )
        )

        All valid states; "Q" in the mathematical description of a state
        machine.
        
stackoverflow/venv/lib/python3.6/site-packages/automat/_core.py