code: def testUnsortedSegmentIds(self):
      # Segment ids are not required to be sorted.
      segment_ids = [0, 4, 3, 2, 4, 4, 2, 0, 0]
      splits1 = segment_id_ops.segment_ids_to_row_splits(segment_ids)
      expected1 = [0, 3, 3, 5, 6, 9]
  
      splits2 = segment_id_ops.segment_ids_to_row_splits(segment_ids, 7)
      expected2 = [0, 3, 3, 5, 6, 9, 9, 9]
      self.assertAllEqual(splits1, expected1)
      self.assertAllEqual(splits2, expected2)
  
file_path: tensorflow-upstream/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 5 for calling the RaggedSplitsToSegmentIdsOpTest obj's underlying member method code with example usage: obj.testUnsortedSegmentIds() without return types