code: def test_multinomial():
      steps = 100
  
      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)
      # Note: we specify `nstreams` to avoid a warning.
      m = R.multinomial(
          pvals=pvals, dtype=config.floatX, nstreams=30 * 256
      )
      f = theano.function([], m)
      f()
      basic_multinomialtest(
          f, steps, sample_size, pvals, n_samples=1, prefix="mrg "
      )
  
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 15 for calling a global function with example usage: test_multinomial() without return types