class_docstr: A `ControlFlowContext` for nodes inside an XLA computation cluster.
  
  THIS IS ONLY FOR TENSORFLOW INTERNAL IMPLEMENTATION, DO NO USE DIRECTLY.
  
  The primary role of `XLACompileContext` is to mark operators inside a
  xla.compile() computation with attribute "_xla_compile_id=XYZ", where XYZ is
  a unique name.
  
  `ControlFlowContext` is used to perform the annotation since it integrates
  with Tensorflow constructs like ResourceVariables. For example, if a
  `ResourceVariable` is constructed inside a xla.compile() block, the
  `ResourceVariable` implementation can use
  `with ops.control_dependencies(None)` to build the variable's definition
  outside the compiled computation.
docstr: Add `val` to the current context and its outer context recursively.
docstr_tok: ["Add","`","val","`","to","the","current","context","and","its","outer","context","recursively","."]
code: def AddValue(self, val):
      """Add `val` to the current context and its outer context recursively."""
      if val.name in self._values:
          # Use the real value if it comes from outer context.
          result = self._external_values.get(val.name)
          return val if result is None else result
  
      result = val
      self._values.add(val.name)
      if self._outer_context:
          result = self._outer_context.AddValue(val)
          self._values.add(result.name)
  
      self._external_values[val.name] = result
  
      return result
  
imports: import contextlib
  from tensorflow.compiler.jit.ops import xla_ops
  from tensorflow.compiler.jit.ops import xla_ops_grad
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.python.distribute import summary_op_util
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import compat
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_inspect
  from tensorflow.python.util.compat import collections_abc
  from tensorflow.python.util.deprecation import deprecated
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 5 for calling the XLACompileContext obj's underlying member method code with example usage: obj.AddValue(val) and returns: result, unknown