code: def test_multinomial_n_samples():
      if (
          config.mode in ["DEBUG_MODE", "DebugMode", "FAST_COMPILE"]
          or config.mode == "Mode"
          and config.linker in ["py"]
      ):
          sample_size = (49, 5)
      else:
          sample_size = (450, 6)
  
      pvals = np.asarray(np.random.uniform(size=sample_size))
      pvals = np.apply_along_axis(
          lambda row: row / np.sum(row), 1, pvals
      )
      R = MRG_RandomStreams(234)
  
      for n_samples, steps in zip([5, 10, 100, 1000], [20, 10, 1, 1]):
          m = R.multinomial(
              pvals=pvals,
              n=n_samples,
              dtype=config.floatX,
              nstreams=30 * 256,
          )
          f = theano.function([], m)
          basic_multinomialtest(
              f, steps, sample_size, pvals, n_samples, prefix="mrg "
          )
          sys.stdout.flush()
  
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 16 for calling a global function with example usage: test_multinomial_n_samples() without return types