class_docstr: Dictionary-like object to hold a vectorized collection of tensors to
  represent all state during inference with :class:`SMCFilter`. During
  inference, the :class:`SMCFilter` resample these tensors.
  
  Keys may have arbitrary hashable type.
  Values must be :class:`torch.Tensor` s.
  
  :param int num_particles:
class_docstr_tok: ["Dictionary-like","object","to","hold","a","vectorized","collection","of","tensors","to","represent","all","state","during","inference","with",":","class",":","`","SMCFilter","`",".","During","inference",",","the",":","class",":","`","SMCFilter","`","resample","these","tensors",".","Keys","may","have","arbitrary","hashable","type",".","Values","must","be",":","class",":","`","torch.Tensor","`","s.",":","param","int","num_particles",":"]
code: def _resample(self, index):
      for key, value in self.items():
          self[key] = value[index].contiguous()
      self._log_weights.fill_(0.0)
  
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 SMCState obj's underlying member method code with example usage: obj._resample(index) without return types