class_docstr: Test the abstract base class behaviors.
class_docstr_tok: ["Test","the","abstract","base","class","behaviors","."]
code: def testMultipartKernelBatchExampleShapesBroadcast(self):
      k = TestKernel(multiplier=3.0)
      mk = psd_kernel_test_util.MultipartTestKernel(
          k, feature_ndims={"foo": 2, "bar": 1}
      )
  
      # x has broadcasted batch and example dims [2, 3, 4].
      x = {"foo": tf.ones([3, 4, 2, 2]), "bar": tf.ones([2, 3, 1, 5])}
  
      # y has broadcasted batch and example dims [1, 3, 1]
      y = {"foo": tf.ones([1, 3, 1, 2, 2]), "bar": tf.ones([1, 1, 5])}
  
      # All extra dimensions are in the batch shape and are broadcasted together.
      self.assertAllEqual(mk.apply(x, y).shape, [2, 3, 4])
  
      # The first two extra dimensions are broadcasted together, and the remaining
      # extra dimensions come in sequence as example dims.
      self.assertAllEqual(mk.matrix(x, y).shape, [2, 3, 4, 1])
      self.assertAllEqual(mk.matrix(x, x).shape, [2, 3, 4, 4])
  
      # The first extra dimension is the batch dimension, and the remaining extra
      # dimensions come in sequence as example dimensions.
      self.assertAllEqual(
          mk.tensor(x, y, x1_example_ndims=2, x2_example_ndims=2).shape,
          [2, 3, 4, 3, 1],
      )
      self.assertAllEqual(
          mk.tensor(x, y, x1_example_ndims=2, x2_example_ndims=3).shape,
          [2, 3, 4, 1, 3, 1],
      )
  
imports: import functools
  import operator
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
  from tensorflow_probability.python.math.psd_kernels.internal import test_util
  from tensorflow_probability.python.math.psd_kernels.internal import util
label_desc: Use image node_id 25 for calling the PositiveSemidefiniteKernelTest obj's underlying member method code with example usage: obj.testMultipartKernelBatchExampleShapesBroadcast() without return types