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:
code: def _lock(self):
      self._locked = True
      try:
          yield
      finally:
          self._locked = False
  
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 2 for calling the SMCState obj's underlying member method code with example usage: obj._lock() without return types