code: def testMapDefunRaisesErrorOnRuntimeShapeMismatch(self):
      @def_function.function(
          input_signature=[
              tensor_spec.TensorSpec(None, dtypes.int32),
              tensor_spec.TensorSpec(None, dtypes.int32),
          ]
      )
      def fn(x, y):
          return x, y
  
      elems1 = array_ops.placeholder(dtypes.int32)
      elems2 = array_ops.placeholder(dtypes.int32)
      result = map_defun.map_defun(
          fn, [elems1, elems2], [dtypes.int32, dtypes.int32], [(), ()]
      )
      with self.cached_session() as sess:
          with self.assertRaisesWithPredicateMatch(
              errors.InvalidArgumentError,
              "All inputs must have the same dimension 0.",
          ):
              sess.run(
                  result,
                  feed_dict={
                      elems1: [1, 2, 3, 4, 5],
                      elems2: [1, 2, 3],
                  },
              )
  
imports: import time
  from absl.testing import parameterized
  from tensorflow.python.client import session
  from tensorflow.python.data.experimental.ops import map_defun
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.eager import def_function
  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 ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the MapDefunTest obj's underlying member method code with example usage: obj.testMapDefunRaisesErrorOnRuntimeShapeMismatch() and returns: x,  y