class_docstr: Abstract base class for reparameterizers.
  
  Derived classes should implement :meth:`apply`.
class_docstr_tok: ["Abstract","base","class","for","reparameterizers",".","Derived","classes","should","implement",":","meth",":","`","apply","`","."]
docstr: Wrap in Independent distributions.
docstr_tok: ["Wrap","in","Independent","distributions","."]
code: def _wrap(self, fn, event_dim):
      """
      Wrap in Independent distributions.
      """
      if fn.event_dim < event_dim:
          fn = fn.to_event(event_dim - fn.event_dim)
      assert fn.event_dim == event_dim
      return fn
  
file_path: pyro/pyro/infer/reparam/reparam.py
imports: import warnings
  from abc import ABC
  from typing import Callable, Optional
  import torch
  from typing_extensions import TypedDict
label_desc: Use image node_id 4 for calling the Reparam obj's underlying member method code with example usage: obj._wrap(fn, event_dim) and returns: fn