class_docstr: Test for tfp.math.trapz.
class_docstr_tok: ["Test","for","tfp.math.trapz","."]
code: def test_multidim(self):
      y = tf.ones((4, 5, 6), dtype=tf.float32)
      integral_0 = self.evaluate(integration.trapz(y, axis=0))
      integral_1 = self.evaluate(integration.trapz(y, axis=1))
      integral_2 = self.evaluate(integration.trapz(y))
      self.assertTupleEqual(integral_0.shape, (5, 6))
      self.assertTupleEqual(integral_1.shape, (4, 6))
      self.assertTupleEqual(integral_2.shape, (4, 5))
      self.assertAllClose(integral_0, np.ones((5, 6)) * 3.0)
      self.assertAllClose(integral_1, np.ones((4, 6)) * 4.0)
      self.assertAllClose(integral_2, np.ones((4, 5)) * 5.0)
  
imports: import hypothesis
  from hypothesis import strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import integration
label_desc: Use image node_id 8 for calling the TrapzTest obj's underlying member method code with example usage: obj.test_multidim() without return types