code: def test_when_set_random_seed_then_expect_same_random_values(
      preserve_random_generator_state,
  ):
      set_random_seed(0)
      numpy_vals1 = np.random.random(10)
      random_vals1 = [random.randint(0, 100) for i in range(10)]
  
      set_random_seed(0)
      numpy_vals2 = np.random.random(10)
      random_vals2 = [random.randint(0, 100) for i in range(10)]
  
      assert numpy_vals1 == approx(numpy_vals2)
      assert random_vals1 == approx(random_vals2)
  
imports: import random
  import networkx
  import numpy
  import pandas
  import pytest
  from _pytest.python_api import approx
  from dowhy import gcm
  from dowhy.gcm.util.general import apply_catboost_encoding, apply_one_hot_encoding, auto_apply_encoders, auto_fit_encoders, fit_catboost_encoders, fit_one_hot_encoders, has_categorical, is_categorical, is_discrete, set_random_seed, setdiff2d, shape_into_2d
label_desc: Use image node_id 8 for calling a global function with example usage: test_when_set_random_seed_then_expect_same_random_values(preserve_random_generator_state) without return types