docstr: Tests the reduce sum of bfloat16 doesn't lose too much precision.
docstr_tok: ["Tests","the","reduce","sum","of","bfloat16","does","n't","lose","too","much","precision","."]
code: def testReduceSumBF16(self):
      """Tests the reduce sum of bfloat16 doesn't lose too much precision."""
  
      if dtypes.bfloat16.as_numpy_dtype not in self.all_types:
          return
  
      bf16_max = np.float32(dtypes.bfloat16.max)
      f32_max = dtypes.float32.max
      value = min(bf16_max, f32_max - bf16_max) / 2
      self._testReduceSum(
          dtypes.bfloat16.as_numpy_dtype(value),
          dtypes.bfloat16.as_numpy_dtype,
          itertools.permutations(
              [bf16_max, value, bf16_max * (-1.0)], 3
          ),
      )
  
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 3 for calling the ReduceOpPrecisionTest obj's underlying member method code with example usage: obj.testReduceSumBF16() without return types