code: def _TensorArraySplitGrad(op: ops.Operation, flow):
      """Gradient for TensorArraySplit.
  
      Args:
        op: Forward TensorArraySplit op.
        flow: Gradient `Tensor` flow to TensorArraySplit.
  
      Returns:
        A grad `Tensor`, the gradient created in upstream ReadGrads or PackGrad.
      """
      handle = op.inputs[0]
      dtype = op.get_attr("T")
      grad_source = _GetGradSource(flow)
      flow_out = array_ops.identity(op.outputs[0], "flow_out")
      # Avoid a race condition where the TensorArrayGrad op is executed before the
      # TensorArraySplit by adding a control dependency on the output flow of
      # the split to the input flow to the TensorArrayGrad.
      with ops.control_dependencies([flow_out]):
          flow = array_ops.identity(flow, "write_barrier")
      g = tensor_array_ops.TensorArray(
          dtype=dtype,
          handle=handle,
          flow=flow,
          colocate_with_first_write_call=False,
      ).grad(source=grad_source, flow=flow)
      grad = g.concat()
      # handle, value, lengths, flow_in
      return [None, grad, None, flow]
  
file_path: tensorflow-upstream/tensorflow/python/ops/tensor_array_grad.py
imports: from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import tensor_array_ops
label_desc: Use image node_id 7 for calling a global function with example usage: _TensorArraySplitGrad(op, flow) and returns: list