code: def testKernelParametersInverseLengthScale(self, feature_ndims, dims):
      # Batch shape [10, 2]
      amplitude = np.random.uniform(
          low=1.0, high=10.0, size=[10, 2]
      ).astype(self.dtype)
  
      inner_length_scale = self.dtype(1.0)
      kernel = exponentiated_quadratic.ExponentiatedQuadratic(
          amplitude,
          length_scale=inner_length_scale,
          feature_ndims=feature_ndims,
      )
      input_shape = [dims] * feature_ndims
  
      # Batch shape [3, 1, 2].
      inverse_length_scale = np.random.uniform(
          2, 5, size=([3, 1, 2] + input_shape)
      ).astype(self.dtype)
  
      ard_kernel = feature_scaled.FeatureScaled(
          kernel,
          scale_diag=None,
          inverse_scale_diag=inverse_length_scale,
      )
  
      ard_kernel_ls = feature_scaled.FeatureScaled(
          kernel, scale_diag=1.0 / inverse_length_scale
      )
  
      x = np.random.uniform(-1, 1, size=input_shape).astype(self.dtype)
      y = np.random.uniform(-1, 1, size=input_shape).astype(self.dtype)
  
      self.assertAllClose(
          self.evaluate(ard_kernel.apply(x, y)),
          self.evaluate(ard_kernel_ls.apply(x, y)),
      )
  
file_path: probability/tensorflow_probability/python/math/psd_kernels/feature_scaled_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
  from tensorflow_probability.python.math.psd_kernels import feature_scaled
label_desc: Use image node_id 3 for calling the _FeatureScaledTest obj's underlying member method code with example usage: obj.testKernelParametersInverseLengthScale(feature_ndims, dims) without return types