class_docstr: Tests for custom assertions.
class_docstr_tok: ["Tests","for","custom","assertions","."]
code: def test_assert_compatible_raises_incompatible_dtype(self, *shape):
      spec = tf.TensorSpec(shape, tf.float32)
      value = tf.zeros(shape, tf.float64)
      with self.assertRaises(
          ValueError
      ):  # pylint: disable=g-error-prone-assert-raises
          py_utils.assert_compatible(spec, value)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils import py_utils
label_desc: Use image node_id 2 for calling the AssertionsTest obj's underlying member method code with example usage: obj.test_assert_compatible_raises_incompatible_dtype() without return types