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. "
              f"({state.overrun_examples} examples overran while generating "
              f"{state.valid_examples} 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.",
              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 "
              f"check found {state.invalid_examples} filtered examples but only "
              f"{state.valid_examples} 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",
              HealthCheck.filter_too_much,
          )
  
      draw_time = sum(state.draw_times)
  
      # Allow at least the greater of one second or 5x the deadline.  If deadline
      # is None, allow 30s - the user can disable the healthcheck too if desired.
      draw_time_limit = 5 * (
          self.settings.deadline or timedelta(seconds=6)
      )
      if draw_time > max(1.0, draw_time_limit.total_seconds()):
          fail_health_check(
              self.settings,
              "Data generation is extremely slow: Only produced "
              f"{state.valid_examples} valid examples in {draw_time:.2f} seconds "
              f"({state.invalid_examples} invalid ones and {state.overrun_examples} "
              "exceeded maximum size). Try decreasing size of the data you're "
              "generating (with e.g. max_size or max_leaves parameters).",
              HealthCheck.too_slow,
          )
  
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 11 for calling the ConjectureRunner obj's underlying member method code with example usage: obj.record_for_health_check(data) without return types