docs: def simplifyTempDfa (tempStates):
      """simplifyTempDfa (tempStates)
      """
      changes = True
      deletedStates = []
      while changes:
          changes = False
          for i in range(1, len(tempStates)):
              if i in deletedStates:
                  continue
              for j in range(0, i):
                  if j in deletedStates:
                      continue
                  if sameState(tempStates[i], tempStates[j]):
                      deletedStates.append(i)
                      for k in range(0, len(tempStates)):
                          if k in deletedStates:
                              continue
                          for arc in tempStates[k][1]:
                              if arc[1] == i:
                                  arc[1] = j
                      changes = True
                      break
      for stateIndex in deletedStates:
          tempStates[stateIndex] = None
      return tempStates