code: def testMapDefunWithStrTensor(self):
      @def_function.function(
          input_signature=[tensor_spec.TensorSpec([], dtypes.string)]
      )
      def fn(x):
          return x
  
      st = sparse_tensor.SparseTensor(
          indices=[[0, 0], [1, 2]], values=[1, 2], dense_shape=[3, 4]
      )
  
      serialized = sparse_ops.serialize_sparse_v2(
          st, out_type=dtypes.string
      )
      serialized = array_ops_stack.stack([serialized, serialized])
      map_defun_op = map_defun.map_defun(
          fn, [serialized], [dtypes.string], [None]
      )[0]
      deserialized = sparse_ops.deserialize_sparse(
          map_defun_op, dtypes.int32
      )
      expected = sparse_tensor.SparseTensorValue(
          indices=[[0, 0, 0], [0, 1, 2], [1, 0, 0], [1, 1, 2]],
          values=[1, 2, 1, 2],
          dense_shape=[2, 3, 4],
      )
      actual = self.evaluate(deserialized)
      self.assertValuesEqual(expected, actual)
  
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 19 for calling the MapDefunTest obj's underlying member method code with example usage: obj.testMapDefunWithStrTensor() and returns: x