docstr: Tests that compare_batch_dimensions raises expected exceptions.
docstr_tok: ["Tests","that","compare_batch_dimensions","raises","expected","exceptions","."]
code: def test_compare_batch_dimensions_raises_exceptions(
      self, error_msg, tensor_shapes, last_axes, broadcast_compatible
  ):
      """Tests that compare_batch_dimensions raises expected exceptions."""
      if not tensor_shapes:
          tensors = 0
      else:
          if all(
              shape.is_static(tensor_shape)
              for tensor_shape in tensor_shapes
          ):
              tensors = [
                  tf.ones(tensor_shape)
                  for tensor_shape in tensor_shapes
              ]
          else:
              # Dynamic shapes are not supported in eager mode.
              if tf.executing_eagerly():
                  return
              tensors = [
                  tf.compat.v1.placeholder(
                      shape=tensor_shape, dtype=tf.float32
                  )
                  for tensor_shape in tensor_shapes
              ]
      self.assert_exception_is_raised(
          shape.compare_batch_dimensions,
          error_msg,
          shapes=[],
          tensors=tensors,
          last_axes=last_axes,
          broadcast_compatible=broadcast_compatible,
      )
  
file_path: graphics/tensorflow_graphics/util/tests/shape_test.py
imports: from absl.testing import parameterized
  import tensorflow
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 5 for calling the ShapeTest obj's underlying member method code with example usage: obj.test_compare_batch_dimensions_raises_exceptions(error_msg, tensor_shapes, last_axes, broadcast_compatible) without return types