code: def testRaggedMap(
      self,
      fn,
      elems,
      expected_output,
      expected_ragged_rank=None,
      result_ragged_rank=None,
      elems_ragged_rank=None,
      elems_dtype=dtypes.int64,
      result_dtype=None,
      infer_shape=True,
  ):
      elems = ragged_factory_ops.constant(
          elems, elems_dtype, elems_ragged_rank
      )
      output = ragged_map_ops.map_fn(
          fn=fn,
          elems=elems,
          dtype=result_dtype,
          infer_shape=infer_shape,
      )
  
      expected_rt = ragged_factory_ops.constant(
          expected_output, ragged_rank=expected_ragged_rank
      )
      self.assertAllEqual(expected_rt, output)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  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 map_fn
  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.ops.ragged import ragged_functional_ops
  from tensorflow.python.ops.ragged import ragged_map_ops
  from tensorflow.python.ops.ragged import ragged_math_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the RaggedMapOpTest obj's underlying member method code with example usage: obj.testRaggedMap(fn, elems, expected_output, expected_ragged_rank, result_ragged_rank, elems_ragged_rank, elems_dtype, result_dtype, infer_shape) without return types