code: def test_smoke(max_plate_nesting, state_size, plate_size, num_steps):
      model = SmokeModel(state_size, plate_size)
      guide = SmokeGuide(state_size, plate_size)
  
      smc = SMCFilter(
          model,
          guide,
          num_particles=100,
          max_plate_nesting=max_plate_nesting,
      )
  
      true_model = SmokeModel(state_size, plate_size)
  
      state = {}
      true_model.init(state)
      truth = [true_model.step(state) for t in range(num_steps)]
  
      smc.init()
      assert set(smc.state) == {"x_mean", "y_mean"}
      for x, y in truth:
          smc.step(x, y)
      assert set(smc.state) == {"x_mean", "y_mean"}
      smc.get_empirical()
  
imports: import pytest
  import torch
  import pyro
  import pyro.distributions
  import pyro.poutine
  from pyro.infer import SMCFilter
  from pyro.infer.smcfilter import _systematic_sample
  from tests.common import assert_close
label_desc: Use image node_id 2 for calling a global function with example usage: test_smoke(max_plate_nesting, state_size, plate_size, num_steps) without return types