code: def _epsilon_closure(self, state):
          
          closure = set([state.stateid])
          stack = [state]
          while True:
              if not stack:
                  break
              s = stack.pop()
              for arc in s:
                  if self.isyms.find(arc.ilabel) != EPSILON or \
                          arc.nextstate in closure:
                      continue
                  closure.add(arc.nextstate)
                  stack.append(self.states[arc.nextstate])
          return closure
docs: Returns the \epsilon-closure for the state given as input.