code: def test_minimize_dfa():
      # Example from www.cs.odu.edu/~toida/nerzic/390teched/regular/fa/min-fa.html
  
      dfa = fsa.DFA(1)
      dfa.add_transition(1, "a", 3)
      dfa.add_transition(1, "b", 2)
      dfa.add_transition(2, "a", 4)
      dfa.add_transition(2, "b", 1)
      dfa.add_transition(3, "a", 5)
      dfa.add_transition(3, "b", 4)
      dfa.add_transition(4, "a", 4)
      dfa.add_transition(4, "b", 4)
      dfa.add_transition(5, "a", 3)
      dfa.add_transition(5, "b", 2)
      dfa.add_final_state(1)
      dfa.add_final_state(5)
  
      good = fsa.DFA(1)
      good.add_transition(1, "a", 3)
      good.add_transition(1, "b", 2)
      good.add_transition(2, "b", 1)
      good.add_transition(3, "a", 1)
      good.add_final_state(1)
  
      dfa.minimize()
      assert dfa == good
  
imports: import gzip
  import os.path
  from bisect import bisect_left
  from whoosh.compat import permutations
  from whoosh.compat import xrange
  from whoosh.automata import fsa, glob, lev
  from whoosh.support.levenshtein import levenshtein
label_desc: Use image node_id 18 for calling a global function with example usage: test_minimize_dfa() without return types