class_docstr: FuncGraph for the gradient function of the branch of an If op.
  
  Handles wrapping and unwrapping intermediate values that are captured by the
  gradient computation in optionals.
  
  Attributes:
    op_needs_rewrite: True if any intermediates were captured, meaning the
      forward If op needs to be written to output the wrapped intermediates.
class_docstr_tok: ["FuncGraph","for","the","gradient","function","of","the","branch","of","an","If","op",".","Handles","wrapping","and","unwrapping","intermediate","values","that","are","captured","by","the","gradient","computation","in","optionals",".","Attributes",":","op_needs_rewrite",":","True","if","any","intermediates","were","captured",",","meaning","the","forward","If","op","needs","to","be","written","to","output","the","wrapped","intermediates","."]
code: def __init__(self, name, forward_graph):
      super(_CondGradFuncGraph, self).__init__(
          name, collections=ops.get_default_graph()._collections
      )  # pylint: disable=protected-access
      self.op_needs_rewrite = False
      self._forward_graph = forward_graph
      # Maps from forward intermediate tensor -> the unwrapped captured
      # intermediate.
      self._indirect_captures = {}
      # Maps unwrapped intermediate -> optional-wrapped intermediate in the
      # forward graph.
      self._wrapped_intermediates = collections.OrderedDict()
      # Raw intermediates captured from the forward graph. Populated iff we're in
      # an XLA context.
      self._xla_intermediates = []
      # Maps forward intermediate constant valued tensor's id to the constant
      # created in this graph for that tensor.
      self._captured_constants = {}
  
imports: import collections
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.eager import backprop_util
  from tensorflow.python.framework import auto_control_deps
  from tensorflow.python.framework import auto_control_deps_utils
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import func_graph
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import none_tensor
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import control_flow_util_v2
  from tensorflow.python.ops import default_gradient
  from tensorflow.python.ops import gen_functional_ops
  from tensorflow.python.ops import gen_optional_ops
  from tensorflow.python.ops import gradients_util
  from tensorflow.python.ops import handle_data_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 to create a new _CondGradFuncGraph object from inherited base classes: util with example: obj = _CondGradFuncGraph(name, forward_graph)