code: def test_ragged_to_dense(self):
      labels = tf.ragged.constant([[0.0, 1.0], [2.0, 3.0, 4.0]])
      predictions = tf.ragged.constant([[5.0, 6.0], [7.0, 8.0, 9.0]])
      weights = tf.ragged.constant([[1.0, 1.0], [2.0, 1.0, 2.0]])
  
      labels, predictions, weights, mask = utils.ragged_to_dense(
          labels, predictions, weights
      )
  
      self.assertAllClose(
          labels, [[0.0, 1.0, utils._PADDING_LABEL], [2.0, 3.0, 4.0]]
      )
      self.assertAllClose(
          predictions,
          [[5.0, 6.0, utils._PADDING_PREDICTION], [7.0, 8.0, 9.0]],
      )
      self.assertAllClose(
          weights, [[1.0, 1.0, utils._PADDING_WEIGHT], [2.0, 1.0, 2.0]]
      )
      self.assertAllClose(
          mask, [[True, True, False], [True, True, True]]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import tensorflow
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 18 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_ragged_to_dense() without return types