class_docstr: This implements a lazily calculated DFA where states
  are labelled by some string that reaches them, and are
  distinguished by a membership test and a set of experiments.
code: def __check_changed(self):
      if self.__generation != self.__lstar.generation:
          raise InvalidState(
              "The underlying L* model has changed, so this DFA is no longer valid. "
              "If you want to preserve a previously learned DFA for posterity, call "
              "canonicalise() on it first."
          )
  
imports: from bisect import bisect_right, insort
  from collections import Counter
  import attr
  from hypothesis.errors import InvalidState
  from hypothesis.internal.conjecture.dfa import DFA, cached
  from hypothesis.internal.conjecture.junkdrawer import IntList, NotFound, SelfOrganisingList, find_integer
label_desc: Use image node_id 2 for calling the LearnedDFA obj's underlying member method code with example usage: obj.__check_changed() without return types