code: def testAsyncCompilationJit(self):
      @function.Defun(compiled=True)
      def CompiledFunction(x):
          return math_ops.log(x)
  
      with session_lib.Session() as sess:
          x = array_ops.placeholder(dtypes.float32)
          y = CompiledFunction(x)
  
          run_metadata = config_pb2.RunMetadata()
          sess.run(
              y,
              feed_dict={x: [0.0] * 60},
              run_metadata=run_metadata,
              options=config_pb2.RunOptions(
                  trace_level=config_pb2.RunOptions.FULL_TRACE
              ),
          )
          # For The first iteration, the fall back path is chosen.
          hasXlaRunOp = MetadataHasXlaRunOp(run_metadata)
          self.assertFalse(hasXlaRunOp)
  
          # Execute the session until after asynchronous compilation is finished
          # and the compiled cluster has been executed once.
          while not hasXlaRunOp:
              run_metadata = config_pb2.RunMetadata()
              sess.run(
                  y,
                  feed_dict={x: [0.0] * 60},
                  run_metadata=run_metadata,
                  options=config_pb2.RunOptions(
                      trace_level=config_pb2.RunOptions.FULL_TRACE
                  ),
              )
              hasXlaRunOp = MetadataHasXlaRunOp(run_metadata)
  
file_path: tensorflow/tensorflow/compiler/tests/async_comp_test.py
imports: import os
  import unittest
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the AsyncCompilationTest obj's underlying member method code with example usage: obj.testAsyncCompilationJit() and returns: math_ops