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: Builds a new XLACompileContext.
  
  Args:
    name: a unique name for the context, used to populate the
      `_xla_compile_id` attribute.
    pivot: a pivot node. Nodes in the XLACompileContext that do not have any
      inputs will have a control dependency on the pivot node. This ensures
      that nodes are correctly included in any enclosing control flow
      contexts.
docstr_tok: ["Builds","a","new","XLACompileContext",".","Args",":","name",":","a","unique","name","for","the","context",",","used","to","populate","the","`","_xla_compile_id","`","attribute",".","pivot",":","a","pivot","node",".","Nodes","in","the","XLACompileContext","that","do","not","have","any","inputs","will","have","a","control","dependency","on","the","pivot","node",".","This","ensures","that","nodes","are","correctly","included","in","any","enclosing","control","flow","contexts","."]
code: def __init__(self, name, pivot):
      """Builds a new XLACompileContext.
  
      Args:
        name: a unique name for the context, used to populate the
          `_xla_compile_id` attribute.
        pivot: a pivot node. Nodes in the XLACompileContext that do not have any
          inputs will have a control dependency on the pivot node. This ensures
          that nodes are correctly included in any enclosing control flow
          contexts.
      """
      super(XLACompileContext, self).__init__()
      self._name = name
      self._name_as_bytes = compat.as_bytes(name)
      self._unsupported_ops = []
      self._pivot = pivot
  
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 1 to create a new XLACompileContext object from inherited base classes: control_flow_ops with example: obj = XLACompileContext(name, pivot)