code: def testClipByValueNonFinite(self):
      # TODO(b/78016351): Enable test on GPU once the bug is fixed.
      with self.cached_session():
          x = constant_op.constant(
              [float("NaN"), float("Inf"), -float("Inf")]
          )
          np_ans = [float("NaN"), 4.0, -4.0]
          clip_value = 4.0
          ans = clip_ops.clip_by_value(x, -clip_value, clip_value)
          tf_ans = self.evaluate(ans)
  
      self.assertAllClose(np_ans, tf_ans)
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the ClipTest obj's underlying member method code with example usage: obj.testClipByValueNonFinite() without return types