code: def testComplexShapes(self):
      with self.cached_session():
          p = 0.5 * np.ones([3, 2, 2], dtype=np.float32)
          n = [[3.0, 2], [4, 5], [6, 7]]
          dist = multinomial.Multinomial(total_count=n, probs=p)
          self.assertEqual(2, dist.event_shape_tensor().eval())
          self.assertAllEqual([3, 2], dist.batch_shape_tensor())
          self.assertEqual(
              tensor_shape.TensorShape([2]), dist.event_shape
          )
          self.assertEqual(
              tensor_shape.TensorShape([3, 2]), dist.batch_shape
          )
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.distributions import multinomial
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the MultinomialTest obj's underlying member method code with example usage: obj.testComplexShapes() without return types