code: def _assert_incompatible_broadcast(self, shape1, shape2):
      if shape1.dims is not None and shape2.dims is not None:
          zeros1 = np.zeros(shape1.as_list())
          zeros2 = np.zeros(shape2.as_list())
          with self.assertRaises(ValueError):
              np.broadcast(zeros1, zeros2)
          with self.assertRaises(ValueError):
              np.broadcast(zeros2, zeros1)
      self.assertFalse(
          common_shapes.is_broadcast_compatible(shape1, shape2)
      )
      self.assertFalse(
          common_shapes.is_broadcast_compatible(shape2, shape1)
      )
      with self.assertRaises(ValueError):
          common_shapes.broadcast_shape(shape1, shape2)
      with self.assertRaises(ValueError):
          common_shapes.broadcast_shape(shape2, shape1)
  
file_path: tensorflow/tensorflow/python/framework/common_shapes_test.py
imports: import numpy
  from tensorflow.python.framework import common_shapes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the CommonShapesTest obj's underlying member method code with example usage: obj._assert_incompatible_broadcast(shape1, shape2) without return types