class_docstr: Given a callable `fn` that contains Pyro primitive calls
  and a callable `config_fn` taking a trace site and returning a dictionary,
  updates the value of the infer kwarg at a sample site to config_fn(site).
  
  :param fn: a stochastic function (callable containing Pyro primitive calls)
  :param config_fn: a callable taking a site and returning an infer dict
  :returns: stochastic function decorated with :class:`~pyro.poutine.infer_config_messenger.InferConfigMessenger`
docstr: :param config_fn: a callable taking a site and returning an infer dict
  
  Constructor. Doesn't do much, just stores the stochastic function
  and the config_fn.
docstr_tok: [":","param","config_fn",":","a","callable","taking","a","site","and","returning","an","infer","dict","Constructor",".","Does","n't","do","much",",","just","stores","the","stochastic","function","and","the","config_fn","."]
code: def __init__(
      self, config_fn: Callable[["Message"], "InferDict"]
  ) -> None:
      """
      :param config_fn: a callable taking a site and returning an infer dict
  
      Constructor. Doesn't do much, just stores the stochastic function
      and the config_fn.
      """
      super().__init__()
      self.config_fn = config_fn
  
imports: from typing import TYPE_CHECKING, Callable
  from pyro.poutine.messenger import Messenger
label_desc: Use image node_id 1 to create a new InferConfigMessenger object from inherited base classes: Messenger with example: obj = InferConfigMessenger(config_fn)