code: def np_random_state(random_state_argument):
      """Decorator to generate a `numpy.random.RandomState` instance.
  
      The decorator processes the argument indicated by `random_state_argument`
      using :func:`nx.utils.create_random_state`.
      The argument value can be a seed (integer), or a `numpy.random.RandomState`
      instance or (`None` or `numpy.random`). The latter options use the glocal
      random number generator used by `numpy.random`.
      The result is a `numpy.random.RandomState` instance.
  
      Parameters
      ----------
      random_state_argument : string or int
          The name or index of the argument to be converted
          to a `numpy.random.RandomState` instance.
  
      Returns
      -------
      _random_state : function
          Function whose random_state keyword argument is a RandomState instance.
  
      Examples
      --------
      Decorate functions like this::
  
         @np_random_state("seed")
         def random_float(seed=None):
             return seed.rand()
  
         @np_random_state(0)
         def random_float(rng=None):
             return rng.rand()
  
         @np_random_state(1)
         def random_array(dims, random_state=1):
             return random_state.rand(*dims)
  
      See Also
      --------
      py_random_state
      """
      return argmap(create_random_state, random_state_argument)
  
imports: import bz2
  import collections
  import gzip
  import inspect
  import itertools
  import re
  import warnings
  from collections import defaultdict
  from contextlib import contextmanager
  from functools import wraps
  from inspect import Parameter, signature
  from os.path import splitext
  from pathlib import Path
  import networkx
  from networkx.utils import create_py_random_state, create_random_state
label_desc: Use image node_id 4 for calling a global function with example usage: np_random_state(random_state_argument) and returns: argmap