class_docstr: Changepoint Kernel.
  
  
  Given a list of kernels `k_1`, `k_2`, ..., `k_n`, and 1-D inputs `x` and `y`,
  this kernel computes a smooth interpolant between the kernels.
  
  ```none
  k(x, y) = (1 - s_1(x)) * k_1(x, y) * (1 - s1(y)) +
            (1 - s_2(x)) * s_1(x) * k_2(x, y) * (1 - s_2(y)) * s_1(y) +
            (1 - s_3(x)) * s_2(x) * k_3(x, y) * (1 - s_3(y)) * s_2(y) +
            ...
            s_{n-1}(x) * kn(x, y) * s_{n-1}(y)
  ```
  
  where:
    * `s_i(x) = sigmoid(slopes[i] * (x - locs[i]))`
    * `locs` is a `Tensor` of length `n - 1` that's in ascending order.
    * `slopes` is a positive `Tensor` of length `n - 1`.
  
  If we have 2 kernels `k1` and `k2`, this takes the form:
  
  ```none
  k(x, y) = (1 - s_1(x)) * k_1(x, y) * (1 - s_1(y)) +
            s_1(x) * k_2(x, y) * s_1(y)
  ```
  
  When `x` and `y` are much less than `locs[0]`, `k(x, y) ~= k1(x, y)`, while
  `x` and `y` are much greater than `locs[0]`, `k(x, y) ~= k2(x, y)`.
  
  In general, this kernel performs a smooth interpolation between `ki(x, y)`
  where `k(x, y) ~= ki(x, y)` when `locs[i - 1] < x, y < locs[i]`.
  
  This kernel accepts an optional `weight_fn` which consumes `x` and returns
  a scalar. This is used when computing the sigmoids
  `si(x) = sigmoid(slopes[i] * (w(x) - locs[i]))`, which allows this kernel
  to be computed on arbitrary dimensional input. For instance, a `weight_fn`
  that is `tf.linalg.norm` would smoothly interpolate between different kernels
  over different annuli in the plane.
  
  #### References
  [1]: Andrew Gordon Wilson. The Change Point Kernel.
       https://www.cs.cmu.edu/~andrewgw/changepoints.pdf
code: def _matrix(self, x1, x2):
      locs = util.pad_shape_with_ones(self.locs, ndims=1, start=-2)
      slopes = util.pad_shape_with_ones(self.slopes, ndims=1, start=-2)
  
      weights_x1 = tf.math.sigmoid(
          slopes
          * (
              self.weight_fn(x1, self.feature_ndims)[..., tf.newaxis]
              - locs
          )
      )
      weights_x1 = weights_x1[..., tf.newaxis, :]
      weights_x2 = tf.math.sigmoid(
          slopes
          * (
              self.weight_fn(x2, self.feature_ndims)[..., tf.newaxis]
              - locs
          )
      )
      weights_x2 = weights_x2[..., tf.newaxis, :, :]
  
      initial_weights = (1.0 - weights_x1) * (1.0 - weights_x2)
      initial_weights = tf.concat(
          [
              initial_weights,
              tf.ones_like(initial_weights[..., 0])[..., tf.newaxis],
          ],
          axis=-1,
      )
      end_weights = weights_x1 * weights_x2
      end_weights = tf.concat(
          [
              tf.ones_like(end_weights[..., 0])[..., tf.newaxis],
              end_weights,
          ],
          axis=-1,
      )
  
      results = [
          k.matrix(x1, x2)[..., tf.newaxis] for k in self.kernels
      ]
      broadcasted_shape = distribution_util.get_broadcast_shape(
          *results
      )
      results = tf.concat(
          [ps.broadcast_to(r, broadcasted_shape) for r in results],
          axis=-1,
      )
      return tf.math.reduce_sum(
          initial_weights * results * end_weights, axis=-1
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
  from tensorflow_probability.python.math.psd_kernels.internal import util
label_desc: Use image node_id 8 for calling the ChangePoint obj's underlying member method code with example usage: obj._matrix(x1, x2) and returns: tf