class_docstr: Ingredients are reusable parts of experiments.
  
  Each Ingredient can have its own configuration (visible as an entry in the
  parents configuration), named configurations, captured functions and
  commands.
  
  Ingredients can themselves use ingredients.
docstr: Decorator to add a config hook to this ingredient.
  
  Config hooks need to be a function that takes 3 parameters and returns
  a dictionary:
  (config, command_name, logger) --> dict
  
  Config hooks are run after the configuration of this Ingredient, but
  before any further ingredient-configurations are run.
  The dictionary returned by a config hook is used to update the
  config updates.
  Note that they are not restricted to the local namespace of the
  ingredient.
docstr_tok: ["Decorator","to","add","a","config","hook","to","this","ingredient",".","Config","hooks","need","to","be","a","function","that","takes","3","parameters","and","returns","a","dictionary",":","(","config",",","command_name",",","logger",")","--",">","dict","Config","hooks","are","run","after","the","configuration","of","this","Ingredient",",","but","before","any","further","ingredient-configurations","are","run",".","The","dictionary","returned","by","a","config","hook","is","used","to","update","the","config","updates",".","Note","that","they","are","not","restricted","to","the","local","namespace","of","the","ingredient","."]
code: def config_hook(self, func):
      """
      Decorator to add a config hook to this ingredient.
  
      Config hooks need to be a function that takes 3 parameters and returns
      a dictionary:
      (config, command_name, logger) --> dict
  
      Config hooks are run after the configuration of this Ingredient, but
      before any further ingredient-configurations are run.
      The dictionary returned by a config hook is used to update the
      config updates.
      Note that they are not restricted to the local namespace of the
      ingredient.
      """
      argspec = inspect.getfullargspec(func)
      args = ["config", "command_name", "logger"]
      if not (
          argspec.args == args
          and argspec.varargs is None
          and not argspec.kwonlyargs
          and argspec.defaults is None
      ):
          raise ValueError(
              "Wrong signature for config_hook. Expected: "
              "(config, command_name, logger)"
          )
      self.config_hooks.append(func)
      return self.config_hooks[-1]
  
imports: from typing import Generator, Tuple, Union
  import inspect
  import os.path
  from sacred.utils import PathType
  from typing import Sequence, Optional
  from collections import OrderedDict
  from sacred.config import ConfigDict, ConfigScope, create_captured_function, load_config_file
  from sacred.dependencies import PEP440_VERSION_PATTERN, PackageDependency, Source, gather_sources_and_dependencies
  from sacred.utils import CircularDependencyError, optional_kwargs_decorator, join_paths
label_desc: Use image node_id 8 for calling the Ingredient obj's underlying member method code with example usage: obj.config_hook(func) and returns: self