code: def is_inside_generated_code():
      """Tests whether the caller is generated code. Implementation-specific."""
      frame = inspect.currentframe()
      try:
          frame = frame.f_back
  
          internal_stack_functions = (
              "converted_call",
              "_call_unconverted",
          )
          # Walk up the stack until we're out of the internal functions.
          while (
              frame is not None
              and frame.f_code.co_name in internal_stack_functions
          ):
              frame = frame.f_back
          if frame is None:
              return False
  
          return "ag__" in frame.f_locals
      finally:
          del frame
  
imports: import contextlib
  import inspect
  import io
  import sys
  import types
  from tensorflow.python.autograph.core import config
  from tensorflow.python.autograph.core import converter
  from tensorflow.python.autograph.impl import api
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling a global function with example usage: is_inside_generated_code() and returns: unknown, False