class_docstr: The GammaExponential kernel.
  
  A generalization of the `ExponentiatedQuadratic` ("squared exponential",
  "Gaussian" or "radial basis function") kernel, this kernel takes the form
  
    ```none
    k(x, y) = amplitude**2 * exp(
        -(||x - y||**2 / (2 * length_scale**2))**power)
    ```
  
  where the double-bars represent vector length (ie, Euclidean, or L2 norm).
  
  The `power` parameter is sometimes referred to as gamma, or as gamma / 2.
  This parameter controls the shape of the kernel.
class_docstr_tok: ["The","GammaExponential","kernel",".","A","generalization","of","the","`","ExponentiatedQuadratic","`","(","``","squared","exponential","''",",","''","Gaussian","''","or","``","radial","basis","function","''",")","kernel",",","this","kernel","takes","the","form","``","`","none","k","(","x",",","y",")","=","amplitude","*","*","2","*","exp","(","-","(","||x","-","y||","*","*","2","\/","(","2","*","length_scale","*","*","2",")",")","*","*","power",")","``","`","where","the","double-bars","represent","vector","length","(","ie",",","Euclidean",",","or","L2","norm",")",".","The","`","power","`","parameter","is","sometimes","referred","to","as","gamma",",","or","as","gamma","\/","2",".","This","parameter","controls","the","shape","of","the","kernel","."]
code: def _apply_with_distance(
      self, x1, x2, pairwise_square_distance, example_ndims=0
  ):
      exponent = 0.5 * pairwise_square_distance
      inverse_length_scale = self._inverse_length_scale_parameter()
      if inverse_length_scale is not None:
          inverse_length_scale = util.pad_shape_with_ones(
              inverse_length_scale, example_ndims
          )
          exponent = exponent * tf.math.square(inverse_length_scale)
  
      if self.power is not None:
          power = tf.convert_to_tensor(self.power)
          power = util.pad_shape_with_ones(power, example_ndims)
          exponent = exponent**power
      else:
          exponent = pairwise_square_distance
      exponent = -1.0 * exponent
  
      if self.amplitude is not None:
          amplitude = tf.convert_to_tensor(self.amplitude)
          amplitude = util.pad_shape_with_ones(amplitude, example_ndims)
          exponent = exponent + 2.0 * tf.math.log(amplitude)
  
      return tf.exp(exponent)
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  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 GammaExponential obj's underlying member method code with example usage: obj._apply_with_distance(x1, x2, pairwise_square_distance, example_ndims) and returns: tf