code: def record_for_health_check(self, data):
      # Once we've actually found a bug, there's no point in trying to run
      # health checks - they'll just mask the actually important information.
      if data.status == Status.INTERESTING:
          self.health_check_state = None
  
      state = self.health_check_state
  
      if state is None:
          return
  
      state.draw_times.extend(data.draw_times)
  
      if data.status == Status.VALID:
          state.valid_examples += 1
      elif data.status == Status.INVALID:
          state.invalid_examples += 1
      else:
          assert data.status == Status.OVERRUN
          state.overrun_examples += 1
  
      max_valid_draws = 10
      max_invalid_draws = 50
      max_overrun_draws = 20
  
      assert state.valid_examples <= max_valid_draws
  
      if state.valid_examples == max_valid_draws:
          self.health_check_state = None
          return
  
      if state.overrun_examples == max_overrun_draws:
          fail_health_check(
              self.settings,
              (
                  "Examples routinely exceeded the max allowable size. "
                  "(%d examples overran while generating %d valid ones)"
                  ". Generating examples this large will usually lead to"
                  " bad results. You could try setting max_size parameters "
                  "on your collections and turning "
                  "max_leaves down on recursive() calls."
              )
              % (state.overrun_examples, state.valid_examples),
              HealthCheck.data_too_large,
          )
      if state.invalid_examples == max_invalid_draws:
          fail_health_check(
              self.settings,
              (
                  "It looks like your strategy is filtering out a lot "
                  "of data. Health check found %d filtered examples but "
                  "only %d good ones. This will make your tests much "
                  "slower, and also will probably distort the data "
                  "generation quite a lot. You should adapt your "
                  "strategy to filter less. This can also be caused by "
                  "a low max_leaves parameter in recursive() calls"
              )
              % (state.invalid_examples, state.valid_examples),
              HealthCheck.filter_too_much,
          )
  
      draw_time = sum(state.draw_times)
  
      if draw_time > 1.0:
          fail_health_check(
              self.settings,
              (
                  "Data generation is extremely slow: Only produced "
                  "%d valid examples in %.2f seconds (%d invalid ones "
                  "and %d exceeded maximum size). Try decreasing "
                  "size of the data you're generating (with e.g."
                  "max_size or max_leaves parameters)."
              )
              % (
                  state.valid_examples,
                  draw_time,
                  state.invalid_examples,
                  state.overrun_examples,
              ),
              HealthCheck.too_slow,
          )
  
imports: from __future__ import absolute_import, division, print_function
  from collections import Counter, defaultdict
  from enum import Enum
  from random import Random, getrandbits
  from weakref import WeakKeyDictionary
  import attr
  from hypothesis import HealthCheck, Phase, Verbosity, settings
  from hypothesis._settings import local_settings
  from hypothesis.internal.cache import LRUReusedCache
  from hypothesis.internal.compat import ceil, hbytes, int_from_bytes
  from hypothesis.internal.conjecture.data import ConjectureData, ConjectureResult, DataObserver, Overrun, Status, StopTest
  from hypothesis.internal.conjecture.datatree import DataTree, PreviouslyUnseenBehaviour, TreeRecordingObserver
  from hypothesis.internal.conjecture.junkdrawer import clamp
  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
label_desc: Use image node_id 8 for calling the ConjectureRunner obj's underlying member method code with example usage: obj.record_for_health_check(data) without return types