code: def testUnbatchDynamicShapeMismatch(self):
      ph1 = array_ops.placeholder(dtypes.int32, shape=[None])
      ph2 = array_ops.placeholder(dtypes.int32, shape=None)
      data = dataset_ops.Dataset.from_tensors((ph1, ph2))
      data = data.unbatch()
      iterator = dataset_ops.make_initializable_iterator(data)
      next_element = iterator.get_next()
  
      with self.cached_session() as sess:
          # Mismatch in the 0th dimension.
          sess.run(
              iterator.initializer,
              feed_dict={
                  ph1: np.arange(7).astype(np.int32),
                  ph2: np.arange(8).astype(np.int32),
              },
          )
          with self.assertRaises(errors.InvalidArgumentError):
              self.evaluate(next_element)
  
          # No 0th dimension (i.e. scalar value) for one component.
          sess.run(
              iterator.initializer,
              feed_dict={ph1: np.arange(7).astype(np.int32), ph2: 7},
          )
          with self.assertRaises(errors.InvalidArgumentError):
              self.evaluate(next_element)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 12 for calling the UnbatchTest obj's underlying member method code with example usage: obj.testUnbatchDynamicShapeMismatch() without return types