code: def test_create_random_state():
      np = pytest.importorskip("numpy")
      rs = np.random.RandomState
  
      assert isinstance(create_random_state(1), rs)
      assert isinstance(create_random_state(None), rs)
      assert isinstance(create_random_state(np.random), rs)
      assert isinstance(create_random_state(rs(1)), rs)
      # Support for numpy.random.Generator
      rng = np.random.default_rng()
      assert isinstance(create_random_state(rng), np.random.Generator)
      pytest.raises(ValueError, create_random_state, "a")
  
      assert np.all(rs(1).rand(10) == create_random_state(1).rand(10))
  
imports: import random
  from copy import copy
  import pytest
  import networkx
  from networkx.utils import PythonRandomInterface, arbitrary_element, create_py_random_state, create_random_state, dict_to_numpy_array, discrete_sequence, flatten, groups, make_list_of_ints, pairwise, powerlaw_sequence
  from networkx.utils.misc import _dict_to_numpy_array1, _dict_to_numpy_array2
label_desc: Use image node_id 6 for calling a global function with example usage: test_create_random_state() without return types