code: def test_nan_terminates(self):
      # Return a NaN tensor that would otherwise have a gradient wrt x.
      func = lambda x: tf.math.tanh(x) * float("nan")
      helpers.estimate_tails(
          func, target=0.5, shape=(), dtype=tf.float32
      )
  
imports: import tensorflow
  import tensorflow_probability
  from tensorflow_compression.python.distributions import deep_factorized
  from tensorflow_compression.python.distributions import helpers
label_desc: Use image node_id 1 for calling the HelpersTest obj's underlying member method code with example usage: obj.test_nan_terminates() without return types