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 msg: current message at a trace site.
  
  If self.config_fn is not None, calls self.config_fn on msg
  and stores the result in msg["infer"].
  
  Otherwise, implements default sampling behavior
  with no additional effects.
docstr_tok: [":","param","msg",":","current","message","at","a","trace","site",".","If","self.config_fn","is","not","None",",","calls","self.config_fn","on","msg","and","stores","the","result","in","msg","[","``","infer","''","]",".","Otherwise",",","implements","default","sampling","behavior","with","no","additional","effects","."]
code: def _pyro_sample(self, msg: "Message") -> None:
      """
      :param msg: current message at a trace site.
  
      If self.config_fn is not None, calls self.config_fn on msg
      and stores the result in msg["infer"].
  
      Otherwise, implements default sampling behavior
      with no additional effects.
      """
      assert msg["infer"] is not None
      msg["infer"].update(self.config_fn(msg))
  
imports: from typing import TYPE_CHECKING, Callable
  from pyro.poutine.messenger import Messenger
label_desc: Use image node_id 2 for calling the InferConfigMessenger obj's underlying member method code with example usage: obj._pyro_sample(msg) without return types