code: def _testAddShouldUseWarningWhenUsed(self, fn, name):
      c = constant_op.constant(0, name=name)
      with reroute_error() as error:
          h = tf_should_use._add_should_use_warning(
              c, warn_in_eager=True
          )
          fn(h)
          del h
      error.assert_not_called()
  
imports: import contextlib
  import gc
  import sys
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import tf_should_use
label_desc: Use image node_id 3 for calling the TfShouldUseTest obj's underlying member method code with example usage: obj._testAddShouldUseWarningWhenUsed(fn, name) without return types