code: def IsInXLAContext(op):
      try:
          xla_compile = op.get_attr("_XlaCompile")
          if xla_compile:
              return True
      except ValueError:
          pass
      ctxt = (
          op._get_control_flow_context()
      )  # pylint: disable=protected-access
      return GetContainingXLAContext(ctxt) is not None
  
imports: import os
  import traceback
  from tensorflow.python import tf2
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 3 for calling a global function with example usage: IsInXLAContext(op) and returns: unknown, True