code: def test_create_py_random_state():
      pyrs = random.Random
  
      assert isinstance(create_py_random_state(1), pyrs)
      assert isinstance(create_py_random_state(None), pyrs)
      assert isinstance(create_py_random_state(pyrs(1)), pyrs)
      pytest.raises(ValueError, create_py_random_state, "a")
  
      np = pytest.importorskip("numpy")
  
      rs = np.random.RandomState
      rng = np.random.default_rng(1000)
      rng_explicit = np.random.Generator(np.random.SFC64())
      nprs = PythonRandomInterface
      assert isinstance(create_py_random_state(np.random), nprs)
      assert isinstance(create_py_random_state(rs(1)), nprs)
      assert isinstance(create_py_random_state(rng), nprs)
      assert isinstance(create_py_random_state(rng_explicit), nprs)
      # test default rng input
      assert isinstance(PythonRandomInterface(), nprs)
  
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 7 for calling a global function with example usage: test_create_py_random_state() without return types