code: def testRaggedOneHot(
      self,
      indices,
      depth,
      on_value=None,
      off_value=None,
      axis=None,
      dtype=None,
      expected=None,
      ragged_rank=None,
  ):
      ragged_indices = ragged_factory_ops.constant(
          indices, ragged_rank=ragged_rank
      )
      result = ragged_array_ops.ragged_one_hot(
          ragged_indices,
          depth,
          on_value=on_value,
          off_value=off_value,
          axis=axis,
          dtype=dtype,
      )
      self.assertAllEqual(result, expected)
      self.assertEqual(result.ragged_rank, ragged_indices.ragged_rank)
  
file_path: tensorflow/tensorflow/python/ops/ragged/ragged_one_hot_op_test.py
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 tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops.ragged import ragged_array_ops
  from tensorflow.python.ops.ragged import ragged_factory_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 RaggedOneHotTest obj's underlying member method code with example usage: obj.testRaggedOneHot(indices, depth, on_value, off_value, axis, dtype, expected, ragged_rank) without return types