class_docstr: Maintain the mapping from the loops to their grad states.
class_docstr_tok: ["Maintain","the","mapping","from","the","loops","to","their","grad","states","."]
docstr: Enter the WhileContext for gradient computation.
docstr_tok: ["Enter","the","WhileContext","for","gradient","computation","."]
code: def EnterGradWhileContext(self, op, before):
      """Enter the WhileContext for gradient computation."""
      grad_state = self.GetGradState(op, before)
      if grad_state:
          grad_state.grad_context.Enter()
  
imports: from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import control_flow_v2_func_graphs
  from tensorflow.python.ops import default_gradient
  from tensorflow.python.ops import gen_data_flow_ops
  from tensorflow.python.ops import gen_resource_variable_ops
  from tensorflow.python.ops import resource_variable_ops
label_desc: Use image node_id 4 for calling the _ControlFlowState obj's underlying member method code with example usage: obj.EnterGradWhileContext(op, before) without return types