code: def GraphOrParentsInXlaContext(graph):
      while True:
          if InXlaContext(graph):
              return True
          try:
              graph = graph.outer_graph
          except AttributeError:
              return False
  
file_path: tensorflow-upstream/tensorflow/python/keras/utils/control_flow_util.py
imports: from tensorflow.python.framework import smart_cond
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import variables
label_desc: Use image node_id 2 for calling a global function with example usage: GraphOrParentsInXlaContext(graph) and returns: True, False