code: def testValuesBetweenChangePoints(self, feature_ndims, dims):
      amplitude = 5.0
      length_scale = 2.0
  
      k1 = exponentiated_quadratic.ExponentiatedQuadratic(
          amplitude, length_scale, feature_ndims=feature_ndims
      )
      k2 = matern.MaternThreeHalves(
          amplitude, length_scale, feature_ndims=feature_ndims
      )
      k3 = matern.MaternOneHalf(
          amplitude, length_scale, feature_ndims=feature_ndims
      )
  
      # Default weight function is to sum over the dimensions.
      locs = (
          5.0
          * feature_ndims
          * dims
          * np.array([-1.0, 1.0], dtype=np.float32)
      )
      # Use a large slope to ensure that we switch between the kernels.
      slopes = np.array([30.0], dtype=np.float32)
  
      c = changepoint.ChangePoint(
          [k1, k2, k3], locs=locs, slopes=slopes
      )
  
      shape = [dims] * feature_ndims
      for k, lims in [
          (k1, [-20.0, -10.0]),
          (k2, [-2.0, 2.0]),
          (k3, [10.0, 20.0]),
      ]:
          x = np.random.uniform(*lims, size=shape).astype(np.float32)
          y = np.random.uniform(*lims, size=shape).astype(np.float32)
          self.assertAllClose(
              self.evaluate(k.apply(x, y)), self.evaluate(c.apply(x, y))
          )
  
          x = np.random.uniform(*lims, size=[3] + shape).astype(
              np.float32
          )
          y = np.random.uniform(*lims, size=[4] + shape).astype(
              np.float32
          )
          self.assertAllClose(
              self.evaluate(k.matrix(x, y)),
              self.evaluate(c.matrix(x, y)),
          )
  
file_path: probability/tensorflow_probability/python/math/psd_kernels/changepoint_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import changepoint
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
  from tensorflow_probability.python.math.psd_kernels import matern
label_desc: Use image node_id 3 for calling the ChangePointTest obj's underlying member method code with example usage: obj.testValuesBetweenChangePoints(feature_ndims, dims) without return types