code: def test_normal_vector(self):
      rng_R = random_state_type()
      avg = tensor.vector()
      std = tensor.vector()
      post_r, out = normal(rng_R, avg=avg, std=std)
      assert out.ndim == 1
      f = compile.function(
          [rng_R, avg, std], [post_r, out], accept_inplace=True
      )
  
      def as_floatX(thing):
          return np.asarray(thing, dtype=theano.config.floatX)
  
      avg_val = [1, 2, 3]
      std_val = as_floatX([0.1, 0.2, 0.3])
      rng = np.random.RandomState(utt.fetch_seed())
      numpy_rng = np.random.RandomState(utt.fetch_seed())
  
      # Arguments of size (3,)
      rng0, val0 = f(rng, avg_val, std_val)
      numpy_val0 = as_floatX(
          numpy_rng.normal(
              loc=as_floatX(avg_val), scale=as_floatX(std_val)
          )
      )
      assert np.all(val0 == numpy_val0)
  
      # arguments of size (2,)
      rng1, val1 = f(rng0, avg_val[:-1], std_val[:-1])
      numpy_val1 = np.asarray(
          numpy_rng.normal(loc=avg_val[:-1], scale=std_val[:-1]),
          dtype=theano.config.floatX,
      )
      assert np.all(val1 == numpy_val1)
  
      # Specifying the size explicitly
      g = compile.function(
          [rng_R, avg, std],
          normal(rng_R, avg=avg, std=std, size=(3,)),
          accept_inplace=True,
      )
      rng2, val2 = g(rng1, avg_val, std_val)
      numpy_val2 = np.asarray(
          numpy_rng.normal(loc=avg_val, scale=std_val, size=(3,)),
          dtype=theano.config.floatX,
      )
      assert np.all(val2 == numpy_val2)
      self.assertRaises(ValueError, g, rng2, avg_val[:-1], std_val[:-1])
  
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 28 for calling the T_random_function obj's underlying member method code with example usage: obj.test_normal_vector() and returns: np