code: def testValuesMatchesNumpy(self, mode, data, repeats, axis):
      # Exception: we can't handle negative axis if data.ndims is unknown.
      if axis < 0 and mode == "unknown_shape":
          return
  
      expected = np.repeat(data, repeats, axis)
  
      if mode == "constant":
          data = constant_op.constant(data)
          repeats = constant_op.constant(repeats)
      elif mode == "dynamic":
          data = constant_op.constant(data)
          repeats = constant_op.constant(repeats)
          data = array_ops.placeholder_with_default(data, data.shape)
          repeats = array_ops.placeholder_with_default(
              repeats, repeats.shape
          )
      elif mode == "unknown_shape":
          data = array_ops.placeholder_with_default(data, None)
          repeats = array_ops.placeholder_with_default(repeats, None)
  
      result = ragged_util.repeat(data, repeats, axis)
      self.assertAllEqual(result, expected)
  
file_path: tensorflow/tensorflow/python/ops/ragged/ragged_util_test.py
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.errors import InvalidArgumentError
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops.ragged import ragged_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 2 for calling the RaggedUtilTest obj's underlying member method code with example usage: obj.testValuesMatchesNumpy(mode, data, repeats, axis) without return types