class_docstr: Tests specialized for AutoGraph, which run as tf.functions.
  
  These tests use a staged programming-like approach: most of the test code runs
  as-is inside a tf.function, but the assertions are lifted outside the
  function, and run with the corresponding function values instead.
  
  For example, the test:
  
      def test_foo(self):
        baz = bar();
        self.assertEqual(baz, value)
  
  is equivalent to writing:
  
      def test_foo(self):
        @tf.function
        def test_fn():
          baz = bar();
          return baz, value
  
        baz_actual, value_actual = test_fn()
        self.assertEqual(baz_actual, value_actual)
  
  Only assertions that require evaluation outside the function are lifted
  outside the function scope. The rest execute inline, at function creation
  time.
class_docstr_tok: ["Tests","specialized","for","AutoGraph",",","which","run","as","tf.functions",".","These","tests","use","a","staged","programming-like","approach",":","most","of","the","test","code","runs","as-is","inside","a","tf.function",",","but","the","assertions","are","lifted","outside","the","function",",","and","run","with","the","corresponding","function","values","instead",".","For","example",",","the","test",":","def","test_foo","(","self",")",":","baz","=","bar","(",")",";","self.assertEqual","(","baz",",","value",")","is","equivalent","to","writing",":","def","test_foo","(","self",")",":","@","tf.function","def","test_fn","(",")",":","baz","=","bar","(",")",";","return","baz",",","value","baz_actual",",","value_actual","=","test_fn","(",")","self.assertEqual","(","baz_actual",",","value_actual",")","Only","assertions","that","require","evaluation","outside","the","function","are","lifted","outside","the","function","scope",".","The","rest","execute","inline",",","at","function","creation","time","."]
code: def _op_callback(
      self, op_type, inputs, attrs, outputs, op_name=None, graph=None
  ):
      self.trace_log.append(op_type)
  
imports: import re
  import sys
  import types
  import unittest
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import op_callbacks
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the AutoGraphTestCase obj's underlying member method code with example usage: obj._op_callback(op_type, inputs, attrs, outputs, op_name, graph) without return types