docstr: Tests reduce sum on a list of input arrays.
  
  For each array in test_inputs, check that performing reduce sum on the array
  produces a value that is close to the expected result.
  
  Args:
    expected_result: the expected result.
    dtype: the data type of the reduce sum operation.
    test_inputs: a list of input arrays for the reduce sum operation.
    rtol: the relative error.
    atol: the absolute error.
docstr_tok: ["Tests","reduce","sum","on","a","list","of","input","arrays",".","For","each","array","in","test_inputs",",","check","that","performing","reduce","sum","on","the","array","produces","a","value","that","is","close","to","the","expected","result",".","Args",":","expected_result",":","the","expected","result",".","dtype",":","the","data","type","of","the","reduce","sum","operation",".","test_inputs",":","a","list","of","input","arrays","for","the","reduce","sum","operation",".","rtol",":","the","relative","error",".","atol",":","the","absolute","error","."]
code: def _testReduceSum(
      self, expected_result, dtype, test_inputs, rtol=1e-3, atol=1e-4
  ):
      """Tests reduce sum on a list of input arrays.
  
      For each array in test_inputs, check that performing reduce sum on the array
      produces a value that is close to the expected result.
  
      Args:
        expected_result: the expected result.
        dtype: the data type of the reduce sum operation.
        test_inputs: a list of input arrays for the reduce sum operation.
        rtol: the relative error.
        atol: the absolute error.
      """
  
      for test_input in test_inputs:
          with self.session() as sess:
              with self.test_scope():
                  a = array_ops.placeholder(dtype)
                  index = array_ops.placeholder(dtypes.int32)
                  out = math_ops.reduce_sum(a, index)
              result = sess.run(
                  out,
                  {a: np.array(test_input, dtype=dtype), index: [0]},
              )
              # Compare the results using float32 type.
              self.assertAllClose(
                  np.float32(result),
                  np.float32(expected_result),
                  rtol=rtol,
                  atol=atol,
              )
  
imports: import functools
  import itertools
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import test_util
  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 1 for calling the ReduceOpPrecisionTest obj's underlying member method code with example usage: obj._testReduceSum(expected_result, dtype, test_inputs, rtol, atol) without return types