class_docstr: Test cases for segment reduction ops.
class_docstr_tok: ["Test","cases","for","segment","reduction","ops","."]
code: def testUnsortedSegmentSumShapeError(self):
      for dtype in self.numeric_types:
          data = np.ones((4, 8, 7), dtype=dtype)
          indices = np.ones((3, 2), dtype=np.int32)
          num_segments = 4
          self.assertRaises(
              ValueError,
              functools.partial(
                  self._segmentReduction,
                  math_ops.unsorted_segment_sum,
                  data,
                  indices,
                  num_segments,
              ),
          )
  
imports: import functools
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.client import device_lib
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 28 for calling the SegmentReductionOpsTest obj's underlying member method code with example usage: obj.testUnsortedSegmentSumShapeError() without return types