Returns the \epsilon-closure for the state given as input.

def _epsilon_closure(self, state):
        """
        Returns the \epsilon-closure for the state given as input.
        """
        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