code: def test_systematic():
      rng = np.random.default_rng(seed=34)
      weights = [0.33, 0.33, 0.33]
      np.testing.assert_array_equal(
          systematic_resampling(weights, rng), [0, 1, 2]
      )
      weights = [0.99, 0.01]
      np.testing.assert_array_equal(
          systematic_resampling(weights, rng), [0, 0]
      )
  
imports: import logging
  import platform
  import warnings
  import numpy
  import pytensor.tensor
  import pytest
  import scipy.stats
  from arviz.data.inference_data import InferenceData
  import pymc
  from pymc.backends.base import MultiTrace
  from pymc.pytensorf import floatX
  from pymc.smc.kernels import IMH, systematic_resampling
  from tests.helpers import assert_random_state_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_systematic() without return types