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``.
code: def _importance_resample(self, probs):
      index = _systematic_sample(probs)
      self.state._resample(index)
  
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 7 for calling the SMCFilter obj's underlying member method code with example usage: obj._importance_resample(probs) without return types