code: def testUnknownShapes(self):
      np.random.seed(12345)
      with self.session() as sess:
          for dtype in self._supported_types():
              data = self._buildData((2, 2), dtype)
              for count in range(1, self._MAX_N + 1):
                  data_ph = array_ops.placeholder(dtype=dtype)
                  actual = sess.run(
                      math_ops.add_n([data_ph] * count), {data_ph: data}
                  )
                  expected = np.sum(
                      np.vstack([np.expand_dims(data, 0)] * count),
                      axis=0,
                  )
                  self.assertAllCloseAccordingToType(
                      expected,
                      actual,
                      half_rtol=5e-3,
                      half_atol=5e-3,
                  )
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/math_ops/aggregate_ops_test.py
imports: import numpy
  from tensorflow.core.framework import tensor_pb2
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the AddNTest obj's underlying member method code with example usage: obj.testUnknownShapes() without return types