code: def testOperatorBroadcast(self):
      x = [
          tf.ones((1, 1, 1, 4), dtype=tf.float32),
          tf.ones((1, 1, 1, 3), dtype=tf.float32),
      ]
      op = self.build_batched_operator()
      bijector = (
          scale_matvec_linear_operator.ScaleMatvecLinearOperatorBlock(
              op, validate_args=True
          )
      )
  
      self.assertAllEqual(
          self.evaluate(
              tf.shape(bijector.forward_log_det_jacobian(x, [1, 1]))
          ),
          self.evaluate(op.batch_shape_tensor()),
      )
  
      # Broadcasting of event shape components with batched LinearOperators
      # raises.
      with self.assertRaisesRegexp(
          ValueError, "bijector parameters changes"
      ):
          self.evaluate(
              bijector.forward_log_det_jacobian(x, event_ndims=[2, 2])
          )
  
      # Broadcasting of event shape components with batched LinearOperators
      # raises for `ldj_reduce_ndims > batch_ndims`.
      with self.assertRaisesRegexp(
          ValueError, "bijector parameters changes"
      ):
          self.evaluate(
              bijector.forward_log_det_jacobian(x, event_ndims=[3, 3])
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import scale_matvec_linear_operator
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the _ScaleMatvecLinearOperatorBlockTest obj's underlying member method code with example usage: obj.testOperatorBroadcast() without return types