code: def test_unsorted_segment_reduction(self, reduction_op, indices):
      t = random_ops.random_uniform(
          constant_op.constant(indices).shape + [2]
      )
      for segment_ids_dtype in (dtypes.int32, dtypes.int64):
          segment_ids = constant_op.constant(
              indices, dtype=segment_ids_dtype
          )
          for num_segments_dtype in (dtypes.int32, dtypes.int64):
              num_segments = constant_op.constant(
                  3, dtype=num_segments_dtype
              )
  
              # pylint: disable=cell-var-from-loop
              def loop_fn(i):
                  data = array_ops.gather(t, i)
                  data_0 = array_ops.gather(t, 0)
                  seg_ids = array_ops.gather(segment_ids, i)
                  seg_ids_0 = array_ops.gather(segment_ids, 0)
                  return (
                      reduction_op(data, seg_ids, num_segments),
                      reduction_op(data_0, seg_ids, num_segments),
                      reduction_op(data, seg_ids_0, num_segments),
                  )
  
              # pylint: enable=cell-var-from-loop
  
              self._test_loop_fn(loop_fn, 3)
  
imports: import itertools
  from absl.testing import parameterized
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import special_math_ops
  from tensorflow.python.ops import tensor_array_grad
  from tensorflow.python.ops.parallel_for import control_flow_ops
  from tensorflow.python.ops.parallel_for.test_util import PForTestCase
  from tensorflow.python.platform import test
label_desc: Use image node_id 23 for calling the MathTest obj's underlying member method code with example usage: obj.test_unsorted_segment_reduction(reduction_op, indices) and returns: reduction_op,  reduction_op,  reduction_op