code: def _states(self, state, processedstates=[]): #pylint: disable=dangerous-default-value
          
          processedstates.append(state)
  
          for nextstate in state.epsilon:
              if not nextstate in processedstates:
                  self._states(nextstate, processedstates)
  
          for _, nextstate in state.transitions:
              if not nextstate in processedstates:
                  self._states(nextstate, processedstates)
  
          return processedstates
docs: Iterate over all states in no particular order