code: def complete_automaton(self):
          
          self.term_state = object()
  
          self.Q.add(self.term_state)
  
          for tv in self.Q:
              for u in self.S:
                  try:
                      self.transition[tv][u]
                  except:
                      self.add_transition(tv, u, self.term_state)
  
          for u in self.S:
              self.add_transition(self.term_state, u, self.term_state)
docs: Adds missing transition states such that δ(q, u) is defined
          for every state q and any u ∈ S