class_docstr: Test the Constant kernel.
class_docstr_tok: ["Test","the","Constant","kernel","."]
code: def testGradsAreNotNone(self):
      val = 0.1
      k = polynomial.Constant(constant=val)
      x = tf.constant([5.0], dtype=np.float32)
      value, grads = self.evaluate(
          gradient.value_and_gradient(lambda x: k.apply(x, x), x)
      )
      self.assertAllClose(value, val)
      self.assertAllClose(grads[0], 0.0)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math.psd_kernels import polynomial
label_desc: Use image node_id 3 for calling the ConstantTest obj's underlying member method code with example usage: obj.testGradsAreNotNone() without return types