code: def test_check_random_state():
      """Check the check_random_state utility function behavior"""
  
      assert check_random_state(None) is np.random.mtrand._rand
      assert check_random_state(np.random) is np.random.mtrand._rand
  
      rng_42 = np.random.RandomState(42)
      assert check_random_state(42).randint(100) == rng_42.randint(100)
  
      rng_42 = np.random.RandomState(42)
      assert check_random_state(rng_42) is rng_42
  
      rng_42 = np.random.RandomState(42)
      assert check_random_state(43).randint(100) != rng_42.randint(100)
  
      assert_raises(ValueError, check_random_state, "some invalid seed")
  
imports: import numpy
  from sklearn.utils._testing import assert_raises
  from gplearn.utils import _get_n_jobs, check_random_state, cpu_count
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_random_state() without return types