code: def testErrors(self):
      self.assertRaisesRegex(
          TypeError,
          r"Argument `tensor` \(name\: segment_ids\) must be of type integer.*",
          segment_id_ops.segment_ids_to_row_splits,
          constant_op.constant([0.5]),
      )
      self.assertRaisesRegex(
          ValueError,
          r"Shape \(\) must have rank 1",
          segment_id_ops.segment_ids_to_row_splits,
          0,
      )
      self.assertRaisesRegex(
          ValueError,
          r"Shape \(1, 1\) must have rank 1",
          segment_id_ops.segment_ids_to_row_splits,
          [[0]],
      )
  
file_path: tensorflow/tensorflow/python/ops/ragged/ragged_segment_ids_to_row_splits_op_test.py
imports: from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.ragged import segment_id_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 3 for calling the RaggedSplitsToSegmentIdsOpTest obj's underlying member method code with example usage: obj.testErrors() without return types