(flow, ta)
| 1109 | """Like `nest.pack_sequence_as` but also replaces flows with TensorArrays.""" |
| 1110 | |
| 1111 | def flow_to_tensor_array(flow, ta): # pylint: disable=missing-docstring |
| 1112 | return (tensor_array_ops.build_ta_with_new_flow(ta, flow) if isinstance( # pylint: disable=g-long-ternary |
| 1113 | ta, tensor_array_ops.TensorArray) else flow) |
| 1114 | |
| 1115 | flattened_loop_vars = [ |
| 1116 | flow_to_tensor_array(*z) |