code: def test_multinomial_tensor3_b(self):
      # Test the examples given in the multinomial documentation regarding
      # tensor3 objects
      rng_R = random_state_type()
      n = 9
      pvals = tensor.dtensor3()
      post_r, out = multinomial(
          rng_R, n=n, pvals=pvals, size=(10, 1, -1)
      )
      assert out.ndim == 4
      assert out.broadcastable == (False, True, False, False)
  
      f = compile.function(
          [rng_R, pvals], [post_r, out], accept_inplace=True
      )
  
      rng = np.random.RandomState(utt.fetch_seed())
      numpy_rng = np.random.RandomState(utt.fetch_seed())
  
      pvals_val = np.asarray([[[0.1, 0.9], [0.2, 0.8], [0.3, 0.7]]])
      assert pvals_val.shape == (1, 3, 2)
  
      out_rng, draw = f(rng, pvals_val)
      assert draw.shape == (10, 1, 3, 2)
      assert np.allclose(draw.sum(axis=3), 9)
  
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 32 for calling the T_random_function obj's underlying member method code with example usage: obj.test_multinomial_tensor3_b() without return types