code: def testAddTensorLists(self):
      with self.session(), self.test_scope():
          l1 = list_ops.tensor_list_reserve(
              element_shape=[],
              element_dtype=dtypes.float32,
              num_elements=3,
          )
          l2 = list_ops.tensor_list_reserve(
              element_shape=[],
              element_dtype=dtypes.float32,
              num_elements=3,
          )
          l1 = list_ops.tensor_list_set_item(l1, 0, 5.0)
          l2 = list_ops.tensor_list_set_item(l2, 2, 10.0)
  
          l = math_ops.add_n([l1, l2])
          self.assertAllEqual(
              list_ops.tensor_list_stack(
                  l, element_dtype=dtypes.float32
              ),
              [5.0, 0.0, 10.0],
          )
  
file_path: tensorflow-upstream/tensorflow/compiler/tests/add_n_test.py
imports: from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import list_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the XlaAddNTest obj's underlying member method code with example usage: obj.testAddTensorLists() without return types