class_docstr: Initializes a site by replacing ``.sample()`` calls with values
  drawn from an initialization strategy. This is mainly for internal use by
  autoguide classes.
  
  :param callable init_fn: An initialization function.
class_docstr_tok: ["Initializes","a","site","by","replacing","``",".sample","(",")","``","calls","with","values","drawn","from","an","initialization","strategy",".","This","is","mainly","for","internal","use","by","autoguide","classes",".",":","param","callable","init_fn",":","An","initialization","function","."]
code: def __init__(self, init_fn):
      self.init_fn = init_fn
      super().__init__()
  
imports: import functools
  from typing import Callable, Optional
  import torch
  from torch.distributions import transform_to
  from pyro.distributions.torch import Independent
  from pyro.distributions.torch_distribution import MaskedDistribution
  from pyro.infer.util import is_validation_enabled
  from pyro.poutine.messenger import Messenger
  from pyro.util import torch_isnan
  from .utils import helpful_support_errors
label_desc: Use image node_id 1 to create a new InitMessenger object from inherited base classes: Messenger with example: obj = InitMessenger(init_fn)