code: def star(self, n):
      s = self.new_state()
      m1 = self.new_state()
      m2 = self.new_state()
      e = self.new_state()
      nfa = NFA(s)
      nfa.add_transition(s, EPSILON, m1)
      nfa.add_transition(s, EPSILON, e)
      nfa.insert(m1, n, m2)
      nfa.add_transition(m2, EPSILON, m1)
      nfa.add_transition(m2, EPSILON, e)
      nfa.add_final_state(e)
      return nfa
  
file_path: whoosh/src/whoosh/automata/reg.py
imports: from whoosh.automata.fsa import ANY, EPSILON, NFA
label_desc: Use image node_id 9 for calling the RegexBuilder obj's underlying member method code with example usage: obj.star(n) and returns: nfa