class_docstr: A class for replacing non-negative integers with a
  "canonical" value that is equivalent for all relevant
  purposes.
docstr: Checks whether ``test`` gives the same answer for
  ``value`` and ``self.normalize(value)``. If it does
  not, updates the list of canonical values so that
  it does.
  
  Returns True if and only if this makes a change to
  the underlying canonical values.
docstr_tok: ["Checks","whether","``","test","``","gives","the","same","answer","for","``","value","``","and","``","self.normalize","(","value",")","``",".","If","it","does","not",",","updates","the","list","of","canonical","values","so","that","it","does",".","Returns","True","if","and","only","if","this","makes","a","change","to","the","underlying","canonical","values","."]
code: def distinguish(self, value, test):
      """Checks whether ``test`` gives the same answer for
      ``value`` and ``self.normalize(value)``. If it does
      not, updates the list of canonical values so that
      it does.
  
      Returns True if and only if this makes a change to
      the underlying canonical values."""
      canonical = self.normalize(value)
      if canonical == value:
          return False
  
      value_test = test(value)
  
      if test(canonical) == value_test:
          return False
  
      self.__cache.clear()
  
      def can_lower(k):
          new_canon = value - k
          if new_canon <= canonical:
              return False
          return test(new_canon) == value_test
  
      new_canon = value - find_integer(can_lower)
  
      assert new_canon not in self.__values
  
      insort(self.__values, new_canon)
  
      assert self.normalize(value) == new_canon
      return True
  
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 6 for calling the IntegerNormalizer obj's underlying member method code with example usage: obj.distinguish(value, test) and returns: True, False, False, unknown, False