docstr: If we've found interesting examples, try to replace each of them
  with a minimal interesting example with the same interesting_origin.
  
  We may find one or more examples with a new interesting_origin
  during the shrink process. If so we shrink these too.
docstr_tok: ["If","we","'ve","found","interesting","examples",",","try","to","replace","each","of","them","with","a","minimal","interesting","example","with","the","same","interesting_origin",".","We","may","find","one","or","more","examples","with","a","new","interesting_origin","during","the","shrink","process",".","If","so","we","shrink","these","too","."]
code: def shrink_interesting_examples(self):
      """If we've found interesting examples, try to replace each of them
      with a minimal interesting example with the same interesting_origin.
  
      We may find one or more examples with a new interesting_origin
      during the shrink process. If so we shrink these too.
      """
      if (
          Phase.shrink not in self.settings.phases
          or not self.interesting_examples
      ):
          return
  
      self.debug("Shrinking interesting examples")
  
      # If the shrinking phase takes more than five minutes, abort it early and print
      # a warning.   Many CI systems will kill a build after around ten minutes with
      # no output, and appearing to hang isn't great for interactive use either -
      # showing partially-shrunk examples is better than quitting with no examples!
      self.finish_shrinking_deadline = time.perf_counter() + 300
  
      for prev_data in sorted(
          self.interesting_examples.values(),
          key=lambda d: sort_key(d.buffer),
      ):
          assert prev_data.status == Status.INTERESTING
          data = self.new_conjecture_data_for_buffer(prev_data.buffer)
          self.test_function(data)
          if data.status != Status.INTERESTING:
              self.exit_with(ExitReason.flaky)
  
      self.clear_secondary_key()
  
      while len(self.shrunk_examples) < len(self.interesting_examples):
          target, example = min(
              (
                  (k, v)
                  for k, v in self.interesting_examples.items()
                  if k not in self.shrunk_examples
              ),
              key=lambda kv: (
                  sort_key(kv[1].buffer),
                  sort_key(repr(kv[0])),
              ),
          )
          self.debug(f"Shrinking {target!r}")
  
          if not self.settings.report_multiple_bugs:
              # If multi-bug reporting is disabled, we shrink our currently-minimal
              # failure, allowing 'slips' to any bug with a smaller minimal example.
              self.shrink(
                  example, lambda d: d.status == Status.INTERESTING
              )
              return
  
          def predicate(d):
              if d.status < Status.INTERESTING:
                  return False
              return d.interesting_origin == target
  
          self.shrink(example, predicate)
  
          self.shrunk_examples.add(target)
  
imports: import math
  import time
  from collections import defaultdict
  from contextlib import contextmanager
  from datetime import timedelta
  from enum import Enum
  from random import Random, getrandbits
  import attr
  from hypothesis import HealthCheck, Phase, Verbosity, settings
  from hypothesis._settings import local_settings
  from hypothesis.errors import StopTest
  from hypothesis.internal.cache import LRUReusedCache
  from hypothesis.internal.compat import ceil, int_from_bytes
  from hypothesis.internal.conjecture.data import ConjectureData, ConjectureResult, DataObserver, Overrun, Status
  from hypothesis.internal.conjecture.datatree import DataTree, PreviouslyUnseenBehaviour, TreeRecordingObserver
  from hypothesis.internal.conjecture.junkdrawer import clamp, ensure_free_stackframes
  from hypothesis.internal.conjecture.pareto import NO_SCORE, ParetoFront, ParetoOptimiser
  from hypothesis.internal.conjecture.shrinker import Shrinker, sort_key
  from hypothesis.internal.healthcheck import fail_health_check
  from hypothesis.reporting import base_report, report
label_desc: Use image node_id 33 for calling the ConjectureRunner obj's underlying member method code with example usage: obj.shrink_interesting_examples() and returns: unknown, False