Return the control flow context for the output of an op.
(op)
| 178 | |
| 179 | |
| 180 | def GetOutputContext(op): |
| 181 | """Return the control flow context for the output of an op.""" |
| 182 | ctxt = op._get_control_flow_context() # pylint: disable=protected-access |
| 183 | # Exit nodes usually have a control flow context, except in the case where the |
| 184 | # exit node was imported via import_graph_def (in which case no nodes have |
| 185 | # control flow contexts). |
| 186 | if ctxt is not None and IsLoopExit(op): |
| 187 | ctxt = ctxt.outer_context |
| 188 | return ctxt |
| 189 | |
| 190 | |
| 191 | def GetContainingWhileContext(ctxt, stop_ctxt=None): |
no test coverage detected