docstr: Wrapper around ``execute_once`` that intercepts test failure
  exceptions and single-test control exceptions, and turns them into
  appropriate method calls to `data` instead.
  
  This allows the engine to assume that any exception other than
  ``StopTest`` must be a fatal error, and should stop the entire engine.
docstr_tok: ["Wrapper","around","``","execute_once","``","that","intercepts","test","failure","exceptions","and","single-test","control","exceptions",",","and","turns","them","into","appropriate","method","calls","to","`","data","`","instead",".","This","allows","the","engine","to","assume","that","any","exception","other","than","``","StopTest","``","must","be","a","fatal","error",",","and","should","stop","the","entire","engine","."]
code: def _execute_once_for_engine(self, data):
      """Wrapper around ``execute_once`` that intercepts test failure
      exceptions and single-test control exceptions, and turns them into
      appropriate method calls to `data` instead.
  
      This allows the engine to assume that any exception other than
      ``StopTest`` must be a fatal error, and should stop the entire engine.
      """
      try:
          result = self.execute_once(data)
          if result is not None:
              fail_health_check(
                  self.settings,
                  (
                      "Tests run under @given should return None, but "
                      "%s returned %r instead."
                  )
                  % (self.test.__name__, result),
                  HealthCheck.return_value,
              )
      except UnsatisfiedAssumption:
          # An "assume" check failed, so instead we inform the engine that
          # this test run was invalid.
          data.mark_invalid()
      except StopTest:
          # The engine knows how to handle this control exception, so it's
          # OK to re-raise it.
          raise
      except (
          HypothesisDeprecationWarning,
          FailedHealthCheck,
      ) + skip_exceptions_to_reraise():
          # These are fatal errors or control exceptions that should stop the
          # engine, so we re-raise them.
          raise
      except failure_exceptions_to_catch() as e:
          # If the error was raised by Hypothesis-internal code, re-raise it
          # as a fatal error instead of treating it as a test failure.
          escalate_hypothesis_internal_error()
  
          if data.frozen:
              # This can happen if an error occurred in a finally
              # block somewhere, suppressing our original StopTest.
              # We raise a new one here to resume normal operation.
              raise StopTest(data.testcounter)
          else:
              # The test failed by raising an exception, so we inform the
              # engine that this test run was interesting. This is the normal
              # path for test runs that fail.
  
              tb = get_trimmed_traceback()
              info = data.extra_information
              info.__expected_traceback = "".join(
                  traceback.format_exception(type(e), e, tb)
              )
              info.__expected_exception = e
              verbose_report(info.__expected_traceback)
  
              origin = traceback.extract_tb(tb)[-1]
              filename = origin[0]
              lineno = origin[1]
              data.mark_interesting((type(e), filename, lineno))
  
imports: from __future__ import absolute_import, division, print_function
  import base64
  import contextlib
  import datetime
  import inspect
  import random
  import sys
  import traceback
  import warnings
  import zlib
  from random import Random
  from unittest import TestCase
  import attr
  import hypothesis.strategies
  from hypothesis._settings import HealthCheck, Phase, Verbosity, local_settings, settings
  from hypothesis.control import BuildContext
  from hypothesis.errors import DeadlineExceeded, DidNotReproduce, FailedHealthCheck, Flaky, Found, HypothesisDeprecationWarning, HypothesisWarning, InvalidArgument, MultipleFailures, NoSuchExample, Unsatisfiable, UnsatisfiedAssumption
  from hypothesis.executors import new_style_executor
  from hypothesis.internal.compat import PY2, bad_django_TestCase, benchmark_time, binary_type, get_type_hints, getfullargspec, hbytes, int_from_bytes, qualname
  from hypothesis.internal.conjecture.data import ConjectureData, StopTest
  from hypothesis.internal.conjecture.engine import ConjectureRunner, sort_key
  from hypothesis.internal.entropy import deterministic_PRNG
  from hypothesis.internal.escalation import escalate_hypothesis_internal_error, get_trimmed_traceback
  from hypothesis.internal.healthcheck import fail_health_check
  from hypothesis.internal.reflection import arg_string, convert_positional_arguments, define_function_signature, function_digest, get_pretty_function_description, impersonate, is_mock, proxies
  from hypothesis.reporting import current_verbosity, report, verbose_report, with_reporter
  from hypothesis.statistics import note_engine_for_statistics
  from hypothesis.strategies._internal.collections import TupleStrategy
  from hypothesis.strategies._internal.strategies import MappedSearchStrategy, SearchStrategy
  from hypothesis.utils.conventions import infer
  from hypothesis.vendor.pretty import CUnicodeIO, RepresentationPrinter
  from hypothesis.version import __version__
label_desc: Use image node_id 3 for calling the StateForActualGivenExecution obj's underlying member method code with example usage: obj._execute_once_for_engine(data) without return types