class_docstr: The central class for each experiment in Sacred.
  
  It manages the configuration, the main function, captured methods,
  observers, commands, and further ingredients.
  
  An Experiment instance should be created as one of the first
  things in any experiment-file.
class_docstr_tok: ["The","central","class","for","each","experiment","in","Sacred",".","It","manages","the","configuration",",","the","main","function",",","captured","methods",",","observers",",","commands",",","and","further","ingredients",".","An","Experiment","instance","should","be","created","as","one","of","the","first","things","in","any","experiment-file","."]
docstr: Decorator for adding an option hook function.
  
  An option hook is a function that is called right before a run
  is created. It receives (and potentially modifies) the options
  dictionary. That is, the dictionary of commandline options used for
  this run.
  
  Notes
  -----
  The decorated function MUST have an argument called options.
  
  The options also contain ``'COMMAND'`` and ``'UPDATE'`` entries,
  but changing them has no effect. Only modification on
  flags (entries starting with ``'--'``) are considered.
code: def option_hook(self, function):
      """
      Decorator for adding an option hook function.
  
      An option hook is a function that is called right before a run
      is created. It receives (and potentially modifies) the options
      dictionary. That is, the dictionary of commandline options used for
      this run.
  
      Notes
      -----
      The decorated function MUST have an argument called options.
  
      The options also contain ``'COMMAND'`` and ``'UPDATE'`` entries,
      but changing them has no effect. Only modification on
      flags (entries starting with ``'--'``) are considered.
      """
      sig = Signature(function)
      if "options" not in sig.arguments:
          raise KeyError(
              "option_hook functions must have an argument called"
              " 'options', but got {}".format(sig.arguments)
          )
      self.option_hooks.append(function)
      return function
  
imports: import inspect
  import os.path
  import sys
  import warnings
  from collections import OrderedDict
  from typing import Sequence, Optional, List
  from docopt import docopt, printable_usage
  from sacred import SETTINGS
  from sacred.arg_parser import format_usage, get_config_updates
  from sacred import commandline_options
  from sacred.commandline_options import CLIOption
  from sacred.commands import help_for_command, print_config, print_dependencies, save_config, print_named_configs
  from sacred.observers.file_storage import file_storage_option
  from sacred.observers.s3_observer import s3_option
  from sacred.config.signature import Signature
  from sacred.ingredient import Ingredient
  from sacred.initialize import create_run
  from sacred.observers.sql import sql_option
  from sacred.observers.tinydb_hashfs import tiny_db_option
  from sacred.run import Run
  from sacred.host_info import check_additional_host_info, HostInfoGetter
  from sacred.utils import print_filtered_stacktrace, ensure_wellformed_argv, SacredError, format_sacred_error, PathType, get_inheritors
  from sacred.observers.mongo import mongo_db_option
label_desc: Use image node_id 4 for calling the Experiment obj's underlying member method code with example usage: obj.option_hook(function) and returns: function