code: def test_args(self):
      # Test that arguments to RandomFunction are honored
      rf2 = RandomFunction(
          np.random.RandomState.uniform, tensor.dvector
      )
      rf4 = RandomFunction(
          np.random.RandomState.uniform, tensor.dvector, inplace=True
      )
      rng_R = random_state_type()
  
      # use make_node to override some of the self.args
      post_r2, out2 = rf2(rng_R, (4,), -2, 2)  # NOT INPLACE
      post_r4, out4 = rf4(rng_R, (4,), -4, 4)  # INPLACE
      post_r2_4, out2_4 = rf2(rng_R, (4,), -4.0, 2)  # NOT INPLACE
      post_r2_4_4, out2_4_4 = rf2(rng_R, (4,), -4.0, 4.0)  # NOT INPLACE
  
      # configure out4 to be computed inplace
      # The update expression means that the random state rng_R will
      # be maintained by post_r4
      f = compile.function(
          [
              compile.In(
                  rng_R,
                  value=np.random.RandomState(utt.fetch_seed()),
                  update=post_r4,
                  mutable=True,
              )
          ],
          [out2, out4, out2_4, out2_4_4],
          accept_inplace=True,
      )
  
      f2, f4, f2_4, f2_4_4 = f()
      f2b, f4b, f2_4b, f2_4_4b = f()
  
      # print f2
      # print f4
      # print f2_4
      # print f2_4_4
  
      # print f2b
      # print f4b
      # print f2_4b
      # print f2_4_4b
  
      # setting bounds is same as multiplying by 2
      assert np.allclose(f2 * 2, f4), (f2, f4)
  
      # retrieving from non-inplace generator
      # is same as inplace one for first call
      assert np.allclose(f2_4_4, f4), (f2_4_4, f4)
  
      # f4 changes from call to call, that the update has worked
      assert not np.allclose(f4, f4b), (f4, f4b)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import pickle
  from theano.tests import unittest_tools
  from theano.tensor.raw_random import *
  from theano.tensor import raw_random, ivector, dvector, iscalar, dcol, dtensor3
  from theano import tensor
  from theano import compile, config, gof
label_desc: Use image node_id 4 for calling the T_random_function obj's underlying member method code with example usage: obj.test_args() without return types