code: def testMultinomialCovarianceBatch(self):
      with self.cached_session():
          # Shape [2]
          n = [5.0] * 2
          # Shape [4, 1, 2]
          p = [[[0.1, 0.9]], [[0.1, 0.9]]] * 2
          dist = multinomial.Multinomial(total_count=n, probs=p)
          # Shape [2, 2]
          inner_var = [[9.0 / 20, -9 / 20], [-9 / 20, 9 / 20]]
          # Shape [4, 2, 2, 2]
          expected_covariances = [[inner_var, inner_var]] * 4
          self.assertEqual((4, 2, 2, 2), dist.covariance().get_shape())
          self.assertAllClose(expected_covariances, dist.covariance())
  
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 20 for calling the MultinomialTest obj's underlying member method code with example usage: obj.testMultinomialCovarianceBatch() without return types