code: def test_repeatable():
      u = scope.uniform(0, 1)
      aa = as_apply(
          dict(
              u=u,
              n=scope.normal(5, 0.1),
              l=[0, 1, scope.one_of(2, 3), u],
          )
      )
      dd1 = sample(aa, np.random.default_rng(3))
      dd2 = sample(aa, np.random.default_rng(3))
      dd3 = sample(aa, np.random.default_rng(4))
      assert dd1 == dd2
      assert dd1 != dd3
  
file_path: hyperopt/hyperopt/pyll/tests/test_stochastic.py
imports: import numpy
  from hyperopt.pyll import scope, as_apply, rec_eval
  from hyperopt.pyll.stochastic import recursive_set_rng_kwarg, sample
label_desc: Use image node_id 4 for calling a global function with example usage: test_repeatable() without return types