code: def easy_guide(model):
      """
      Convenience decorator to create an :class:`EasyGuide` .
      The following are equivalent::
  
          # Version 1. Decorate a function.
          @easy_guide(model)
          def guide(self, foo, bar):
              return my_guide(foo, bar)
  
          # Version 2. Create and instantiate a subclass of EasyGuide.
          class Guide(EasyGuide):
              def guide(self, foo, bar):
                  return my_guide(foo, bar)
          guide = Guide(model)
  
      Note ``@easy_guide`` wrappers cannot be pickled; to build a guide that can
      be pickled, instead subclass from :class:`EasyGuide`.
  
      :param callable model: a Pyro model.
      """
  
      def decorator(fn):
          Guide = type(fn.__name__, (EasyGuide,), {"guide": fn})
          return Guide(model)
  
      return decorator
  
imports: import re
  import weakref
  from abc import ABCMeta, abstractmethod
  from contextlib import ExitStack
  import torch
  from torch.distributions import biject_to
  import pyro
  import pyro.distributions
  import pyro.poutine
  import pyro.poutine.runtime
  from pyro.distributions.util import broadcast_shape, sum_rightmost
  from pyro.infer.autoguide.guides import prototype_hide_fn
  from pyro.infer.autoguide.initialization import InitMessenger
  from pyro.nn.module import PyroModule, PyroParam
label_desc: Use image node_id 1 for calling a global function with example usage: easy_guide(model) and returns: decorator, Guide