code: def executor(runner):
      try:
          return runner.execute_example
      except AttributeError:
          pass
  
      if hasattr(runner, "setup_example") or hasattr(
          runner, "teardown_example"
      ):
          return setup_teardown_executor(
              getattr(runner, "setup_example", None),
              getattr(runner, "teardown_example", None),
          )
  
      return default_executor
  
file_path: catboost/contrib/python/hypothesis/py2/hypothesis/executors.py
imports: from __future__ import absolute_import, division, print_function
label_desc: Use image node_id 3 for calling a global function with example usage: executor(runner) and returns: default_executor, runner, setup_teardown_executor