code: def test_sparse_lengths_sum_invalid_index(self, gc, dc):
      D = np.random.rand(50, 3, 4, 5).astype(np.float32)
      I = (np.random.randint(0, 10000, size=10) + 10000).astype(
          np.int64
      )
      L = np.asarray([4, 4, 2]).astype(np.int32)
      op = core.CreateOperator(
          "SparseLengthsSum", ["D", "I", "L"], "out"
      )
      workspace.FeedBlob("D", D)
      workspace.FeedBlob("I", I)
      workspace.FeedBlob("L", L)
      with self.assertRaises(RuntimeError):
          workspace.RunOperatorOnce(op)
  
imports: from functools import partial
  from hypothesis import given, settings
  import numpy
  import unittest
  import hypothesis.strategies
  from caffe2.python import core, workspace
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
label_desc: Use image node_id 20 for calling the TestSegmentOps obj's underlying member method code with example usage: obj.test_sparse_lengths_sum_invalid_index(gc, dc) without return types