code: def recursive_set_rng_kwarg(expr, rng=None):
      """
      Make all of the stochastic nodes in expr use the rng
  
      uniform(0, 1) -> uniform(0, 1, rng=rng)
      """
      if rng is None:
          rng = np.random.RandomState()
      lrng = as_apply(rng)
      for node in dfs(expr):
          if node.name in implicit_stochastic_symbols:
              for ii, (name, arg) in enumerate(list(node.named_args)):
                  if name == "rng":
                      node.named_args[ii] = ("rng", lrng)
                      break
              else:
                  node.named_args.append(("rng", lrng))
      return expr
  
imports: from __future__ import print_function
  from __future__ import division
  from builtins import range
  from past.utils import old_div
  import sys
  import numpy
  from .base import scope, as_apply, dfs, rec_eval, clone
label_desc: Use image node_id 16 for calling a global function with example usage: recursive_set_rng_kwarg(expr, rng) and returns: expr