code: def test_normal0():
      steps = 50
      std = 2.0
      if (
          config.mode in ["DEBUG_MODE", "DebugMode", "FAST_COMPILE"]
          or config.mode == "Mode"
          and config.linker in ["py"]
      ):
          sample_size = (25, 30)
          default_rtol = 0.02
      else:
          sample_size = (999, 50)
          default_rtol = 0.01
      sample_size_odd = (sample_size[0], sample_size[1] - 1)
      x = tensor.matrix()
  
      test_cases = [
          (
              sample_size,
              sample_size,
              [],
              [],
              -5.0,
              default_rtol,
              default_rtol,
          ),
          (
              x.shape,
              sample_size,
              [x],
              [np.zeros(sample_size, dtype=config.floatX)],
              -5.0,
              default_rtol,
              default_rtol,
          ),
          # test odd value
          (
              x.shape,
              sample_size_odd,
              [x],
              [np.zeros(sample_size_odd, dtype=config.floatX)],
              -5.0,
              default_rtol,
              default_rtol,
          ),
          (
              sample_size,
              sample_size,
              [],
              [],
              np.arange(np.prod(sample_size), dtype="float32").reshape(
                  sample_size
              ),
              10.0 * std / np.sqrt(steps),
              default_rtol,
          ),
          # test empty size (scalar)
          ((), (), [], [], -5.0, default_rtol, 0.02),
          # test with few samples at the same time
          ((1,), (1,), [], [], -5.0, default_rtol, 0.02),
          ((3,), (3,), [], [], -5.0, default_rtol, 0.02),
      ]
  
      for (
          size,
          const_size,
          var_input,
          input,
          avg,
          rtol,
          std_tol,
      ) in test_cases:
          R = MRG_RandomStreams(234)
          # Note: we specify `nstreams` to avoid a warning.
          n = R.normal(
              size=size,
              avg=avg,
              std=std,
              nstreams=rng_mrg.guess_n_streams(size, warn=False),
          )
          f = theano.function(var_input, n)
          f(*input)
  
          # Increase the number of steps if size implies only a few samples
          if np.prod(const_size) < 10:
              steps_ = steps * 50
          else:
              steps_ = steps
          basictest(
              f,
              steps_,
              const_size,
              target_avg=avg,
              target_std=std,
              prefix="mrg ",
              allow_01=True,
              inputs=input,
              mean_rtol=rtol,
              std_tol=std_tol,
          )
  
          sys.stdout.flush()
  
          RR = theano.tensor.shared_randomstreams.RandomStreams(234)
  
          nn = RR.normal(size=size, avg=avg, std=std)
          ff = theano.function(var_input, nn)
  
          basictest(
              ff,
              steps_,
              const_size,
              target_avg=avg,
              target_std=std,
              prefix="numpy ",
              allow_01=True,
              inputs=input,
              mean_rtol=rtol,
          )
  
imports: from __future__ import absolute_import, print_function, division
  import os
  import sys
  import time
  import unittest
  from nose.tools import assert_raises
  import numpy
  from six.moves import xrange
  import theano
  from theano import change_flags, config, tensor
  from theano.sandbox import rng_mrg
  from theano.sandbox.rng_mrg import MRG_RandomStreams
  from theano.tests import unittest_tools
  from theano.tests.unittest_tools import attr
label_desc: Use image node_id 11 for calling a global function with example usage: test_normal0() without return types