code: def testTensorGradAccessTwiceReceiveSameObject(self):
      with self.session() as session, self.test_scope():
          ta_out = {}
  
          def fn():
              ta = tensor_array_ops.TensorArray(
                  dtype=dtypes.float32,
                  tensor_array_name="foo",
                  size=3,
                  element_shape=[1, 2],
              )
  
              g_ta_0 = ta.grad("grad")
              g_ta_1 = ta.grad("grad")
  
              ta_out[0] = g_ta_0.handle
              ta_out[1] = g_ta_1.handle
  
              with ops.control_dependencies(
                  [g_ta_0.write(0, [[4.0, 5.0]]).flow]
              ):
                  # Write with one gradient handle, read with another copy of it
                  r1_0 = g_ta_1.read(0)
  
              with ops.control_dependencies(
                  [g_ta_0.handle.op, g_ta_1.handle.op]
              ):
                  return [r1_0]
  
          [d_r1_0] = self.evaluate(xla.compile(fn))
          self.assertAllEqual([[4.0, 5.0]], d_r1_0)
  
imports: import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.compiler.xla import xla
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import gen_data_flow_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import tensor_array_grad
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 14 for calling the TensorArrayTest obj's underlying member method code with example usage: obj.testTensorGradAccessTwiceReceiveSameObject() and returns: list