code: def __init__(
      self,
      name=None,
      size=None,
      subsample_size=None,
      subsample=None,
      dim=None,
      use_cuda=None,
      device=None,
  ):
      size, subsample_size, indices = OrigSubsampleMessenger._subsample(
          name, size, subsample_size, subsample, use_cuda, device
      )
      self.subsample_size = subsample_size
      self._full_size = size
      self._scale = float(size) / subsample_size
      # initialize other things last
      super().__init__(name, subsample_size, dim, indices)
  
imports: from collections import OrderedDict
  from numbers import Number
  import funsor
  from pyro.contrib.funsor.handlers.named_messenger import DimRequest, DimType, GlobalNamedMessenger, NamedMessenger
  from pyro.contrib.funsor.handlers.primitives import to_data, to_funsor
  from pyro.distributions.util import copy_docs_from
  from pyro.poutine.broadcast_messenger import BroadcastMessenger
  from pyro.poutine.indep_messenger import CondIndepStackFrame
  from pyro.poutine.messenger import Messenger
  from pyro.poutine.runtime import effectful
  from pyro.poutine.subsample_messenger import SubsampleMessenger
  from pyro.util import ignore_jit_warnings
label_desc: Use image node_id 1 to create a new SubsampleMessenger object from inherited base classes: IndepMessenger with example: obj = SubsampleMessenger(name, size, subsample_size, subsample, dim, use_cuda, device)