Fail if the 2 items are from different graphs. Args: original_item: Original item to check against. item: Item to check. Raises: ValueError: if graphs do not match.
(original_item, item)
| 5980 | |
| 5981 | |
| 5982 | def _assert_same_graph(original_item, item): |
| 5983 | """Fail if the 2 items are from different graphs. |
| 5984 | |
| 5985 | Args: |
| 5986 | original_item: Original item to check against. |
| 5987 | item: Item to check. |
| 5988 | |
| 5989 | Raises: |
| 5990 | ValueError: if graphs do not match. |
| 5991 | """ |
| 5992 | if original_item.graph is not item.graph: |
| 5993 | raise ValueError("%s must be from the same graph as %s." % |
| 5994 | (item, original_item)) |
| 5995 | |
| 5996 | |
| 5997 | def _get_graph_from_inputs(op_input_list, graph=None): |
no outgoing calls
no test coverage detected