code: def testFillFloat(self):
      with self.session():
          values = constant_op.constant(
              [1.0, 3.0, 5.0, 7.0, 2.0, 4.0, 6.0, 8.0],
              dtype=dtypes.float64,
          )
          default_value = constant_op.constant(
              -1.0, dtype=dtypes.float64
          )
          ragged_input = ragged_tensor.RaggedTensor.from_row_lengths(
              values=values, row_lengths=[0, 4, 0, 4, 0]
          )
          (
              ragged_output,
              empty_row_indicator,
          ) = ragged_array_ops.fill_empty_rows(
              ragged_input, default_value
          )
  
          self.assertAllEqual(
              ragged_output.row_lengths(), [1, 4, 1, 4, 1]
          )
          self.assertAllEqual(
              ragged_output.values,
              [
                  -1.0,
                  1.0,
                  3.0,
                  5.0,
                  7.0,
                  -1.0,
                  2.0,
                  4.0,
                  6.0,
                  8.0,
                  -1.0,
              ],
          )
          self.assertAllEqual(
              empty_row_indicator, [True, False, True, False, True]
          )
  
          values_grad_err = gradient_checker.compute_gradient_error(
              values,
              values.shape.as_list(),
              ragged_output.values,
              [11],
              delta=1e-8,
          )
          self.assertGreater(values_grad_err, 0)
          self.assertLess(values_grad_err, 1e-8)
  
          default_value_grad_err = (
              gradient_checker.compute_gradient_error(
                  default_value,
                  default_value.shape.as_list(),
                  ragged_output.values,
                  [11],
                  delta=1e-8,
              )
          )
          self.assertGreater(default_value_grad_err, 0)
          self.assertLess(default_value_grad_err, 1e-8)
  
file_path: tensorflow/tensorflow/python/ops/ragged/ragged_fill_empty_rows_op_test.py
imports: import numpy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gradient_checker
  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 2 for calling the RaggedFillEmptyRowsTest obj's underlying member method code with example usage: obj.testFillFloat() without return types