class_docstr: Object stored in TFShouldUse-wrapped objects.
  
  When it is deleted it will emit a warning or error if its `sate` method
  has not been called by time of deletion, and Tensorflow is not executing
  eagerly or inside a tf.function (which use autodeps and resolve the
  main issues this wrapper warns about).
class_docstr_tok: ["Object","stored","in","TFShouldUse-wrapped","objects",".","When","it","is","deleted","it","will","emit","a","warning","or","error","if","its","`","sate","`","method","has","not","been","called","by","time","of","deletion",",","and","Tensorflow","is","not","executing","eagerly","or","inside","a","tf.function","(","which","use","autodeps","and","resolve","the","main","issues","this","wrapper","warns","about",")","."]
code: def __init__(
      self, type_, repr_, stack_frame, error_in_function, warn_in_eager
  ):
      self._type = type_
      self._repr = repr_
      self._stack_frame = stack_frame
      self._error_in_function = error_in_function
      if context.executing_eagerly():
          # If warn_in_eager, sated == False.  Otherwise true.
          self._sated = not warn_in_eager
      elif ops.inside_function():
          if error_in_function:
              self._sated = False
              ops.add_exit_callback_to_default_func_graph(
                  lambda: self._check_sated(raise_error=True)
              )
          else:
              self._sated = True
      else:
          # TF1 graph building mode
          self._sated = False
  
imports: import copy
  import sys
  import textwrap
  import traceback
  import types
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import tf_decorator
label_desc: Use image node_id 1 to create a new _TFShouldUseHelper object from inherited base classes: object with example: obj = _TFShouldUseHelper(type_, repr_, stack_frame, error_in_function, warn_in_eager)