class_docstr: :class:`SMCFilter` is the top-level interface for filtering via sequential
  monte carlo.
  
  The model and guide should be objects with two methods:
  ``.init(state, ...)`` and ``.step(state, ...)``, intended to be called
  first with :meth:`init` , then with :meth:`step` repeatedly.  These two
  methods should have the same signature as :class:`SMCFilter` 's
  :meth:`init` and :meth:`step` of this class, but with an extra first
  argument ``state`` that should be used to store all tensors that depend on
  sampled variables. The ``state`` will be a dict-like object,
  :class:`SMCState` , with arbitrary keys and :class:`torch.Tensor` values.
  Models can read and write ``state`` but guides can only read from it.
  
  Inference complexity is ``O(len(state) * num_time_steps)``, so to avoid
  quadratic complexity in Markov models, ensure that ``state`` has fixed size.
  
  :param object model: probabilistic model with ``init`` and ``step`` methods
  :param object guide: guide used for sampling,  with ``init`` and ``step``
      methods
  :param int num_particles: The number of particles used to form the
      distribution.
  :param int max_plate_nesting: Bound on max number of nested
      :func:`pyro.plate` contexts.
  :param float ess_threshold: Effective sample size threshold for deciding
      when to importance resample: resampling occurs when
      ``ess < ess_threshold * num_particles``.
docstr: :returns: a marginal distribution over all state tensors.
  :rtype: a dictionary with keys which are latent variables and values
      which are :class:`~pyro.distributions.Empirical` objects.
docstr_tok: [":","returns",":","a","marginal","distribution","over","all","state","tensors",".",":","rtype",":","a","dictionary","with","keys","which","are","latent","variables","and","values","which","are",":","class",":","`","~pyro.distributions.Empirical","`","objects","."]
code: def get_empirical(self):
      """
      :returns: a marginal distribution over all state tensors.
      :rtype: a dictionary with keys which are latent variables and values
          which are :class:`~pyro.distributions.Empirical` objects.
      """
      return {
          key: dist.Empirical(value, self.state._log_weights)
          for key, value in self.state.items()
      }
  
imports: import contextlib
  import math
  import torch
  import pyro
  import pyro.distributions
  import pyro.poutine
  from pyro.infer.util import is_validation_enabled
  from pyro.poutine.util import prune_subsample_sites
label_desc: Use image node_id 4 for calling the SMCFilter obj's underlying member method code with example usage: obj.get_empirical() and returns: unknown