class_docstr: Tests for custom assertions.
class_docstr_tok: ["Tests","for","custom","assertions","."]
code: def test_assert_compatible(self):
      spec = [
          tf.TensorSpec((2,), tf.int32),
          (
              tf.TensorSpec((2, 3), tf.float64),
              tf.TensorSpec((), tf.float32),
          ),
      ]
      value = [
          tf.zeros((2,), tf.int32),
          (tf.zeros((2, 3), tf.float64), tf.zeros((), tf.float32)),
      ]
      py_utils.assert_compatible(spec, value)
      py_utils.assert_compatible(
          tf.TensorSpec(None, tf.int32), tf.zeros((2,), tf.int32)
      )
  
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 1 for calling the AssertionsTest obj's underlying member method code with example usage: obj.test_assert_compatible() without return types