message: Enable doctest in TensorArray class.
  The race condition happening earlier was because resource reads were not added to the list of control outputs of the tf.function. That has been fixed in a separate change.
diff: @@ -986,20 +986,17 @@ class TensorArray(object):
  Example 3: A simple loop interacting with a `tf.Variable`.
  - # TODO(b/153898334): Convert back to doctest once bug is resolved.
  - ```
  - v = tf.Variable(1)
  - @tf.function
  - def f(x):
  - ta = tf.TensorArray(tf.int32, size=0, dynamic_size=True)
  - for i in tf.range(x):
  - v.assign_add(i)
  - ta = ta.write(i, v)
  - return ta.stack()
  - f(5)
  + >>> v = tf.Variable(1)
  + >>> @tf.function
  + ... def f(x):
  + ... ta = tf.TensorArray(tf.int32, size=0, dynamic_size=True)
  + ... for i in tf.range(x):
  + ... v.assign_add(i)
  + ... ta = ta.write(i, v)
  + ... return ta.stack()
  + >>> f(5)
  <tf.Tensor: shape=(5,), dtype=int32, numpy=array([ 1, 2, 4, 7, 11],
  dtype=int32)>
  - ```
  """
  def __init__(self,
  