code: def _testDeserializeFailsWrongTypeHelper(
      self, serialize_fn, deserialize_fn, out_type=dtypes.string
  ):
      with self.cached_session(use_gpu=False) as sess:
          sp_input0 = self._SparseTensorPlaceholder()
          sp_input1 = self._SparseTensorPlaceholder()
          input0_val = self._SparseTensorValue_5x6(np.arange(6))
          input1_val = self._SparseTensorValue_3x4(np.arange(6))
          serialized0 = serialize_fn(sp_input0, out_type=out_type)
          serialized1 = serialize_fn(sp_input1, out_type=out_type)
          serialized_concat = array_ops_stack.stack(
              [serialized0, serialized1]
          )
  
          sp_deserialized = deserialize_fn(
              serialized_concat, dtype=dtypes.int64
          )
  
          with self.assertRaisesOpError(
              r"Requested SparseTensor of type int64 but "
              r"SparseTensor\[0\].values.dtype\(\) == int32"
          ):
              sess.run(
                  sp_deserialized,
                  {sp_input0: input0_val, sp_input1: input1_val},
              )
  
imports: import numpy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import gen_resource_variable_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 31 for calling the SerializeSparseTest obj's underlying member method code with example usage: obj._testDeserializeFailsWrongTypeHelper(serialize_fn, deserialize_fn, out_type) without return types