code: def test_systematic_sample(size):
      pyro.set_rng_seed(size)
      probs = torch.randn(size).exp()
      probs /= probs.sum()
  
      num_samples = 20000
      index = _systematic_sample(probs.expand(num_samples, size))
      histogram = torch.zeros_like(probs)
      histogram.scatter_add_(
          -1,
          index.reshape(-1),
          probs.new_ones(1).expand(num_samples * size),
      )
  
      expected = probs * size
      actual = histogram / num_samples
      assert_close(actual, expected, atol=0.01)
  
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 1 for calling a global function with example usage: test_systematic_sample(size) without return types