class_docstr: Test for tfp.math.trapz.
class_docstr_tok: ["Test","for","tfp.math.trapz","."]
code: def test_non_scalar_dx_raises(self):
      with self.assertRaisesRegexp(
          ValueError, "Expected dx to be a scalar"
      ):
          integration.trapz(y=tf.ones((2, 3)), dx=[0.1, 0.2])
  
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 5 for calling the TrapzTest obj's underlying member method code with example usage: obj.test_non_scalar_dx_raises() without return types