code: def testBroadcastingParametersAndValuesMatchFeatureScaled(
      self,
      continuous_feature_ndims,
      categorical_feature_ndims,
      continuous_dims,
      categorical_dims,
  ):
      # Batch shape [10, 2]
      amplitude = np.random.uniform(low=1.0, high=10.0, size=[10, 2])
      kernel = exponentiated_quadratic.ExponentiatedQuadratic(
          amplitude,
          length_scale=1.0,
          feature_ndims=continuous_feature_ndims,
      )
      continuous_input_shape = [
          continuous_dims
      ] * continuous_feature_ndims
      categorical_input_shape = [
          categorical_dims
      ] * categorical_feature_ndims
  
      # Batch shape [3, 1, 2].
      continuous_length_scale = np.random.uniform(
          2, 5, size=([3, 1, 2] + continuous_input_shape)
      )
      categorical_length_scale = np.random.uniform(
          2, 5, size=([10, 2] + categorical_input_shape)
      )
  
      ard_kernel = feature_scaled.FeatureScaled(
          kernel, scale_diag=continuous_length_scale
      )
      cat_kernel = fswc.FeatureScaledWithCategorical(
          kernel,
          scale_diag=fswc.ContinuousAndCategoricalValues(
              continuous_length_scale, categorical_length_scale
          ),
          feature_ndims=fswc.ContinuousAndCategoricalValues(
              continuous_feature_ndims, categorical_feature_ndims
          ),
      )
  
      x = np.random.uniform(-1, 1, size=[1] + continuous_input_shape)
      y = np.random.uniform(-1, 1, size=[1] + continuous_input_shape)
  
      # Zero distance between categorical features.
      cat = np.ones([1] + categorical_input_shape, dtype=np.int32)
      x_ = fswc.ContinuousAndCategoricalValues(x, cat)
      y_ = fswc.ContinuousAndCategoricalValues(y, cat)
  
      self.assertAllClose(
          self.evaluate(ard_kernel.apply(x, y)),
          self.evaluate(cat_kernel.apply(x_, y_)),
      )
      self.assertAllClose(
          self.evaluate(ard_kernel.matrix(x, y)),
          self.evaluate(cat_kernel.matrix(x_, y_)),
      )
  
file_path: probability/tensorflow_probability/python/experimental/psd_kernels/feature_scaled_with_categorical_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.psd_kernels import feature_scaled_with_categorical
  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
  from tensorflow_probability.python.math.psd_kernels import matern
label_desc: Use image node_id 4 for calling the FeatureScaledWithCategoricalTest obj's underlying member method code with example usage: obj.testBroadcastingParametersAndValuesMatchFeatureScaled(continuous_feature_ndims, categorical_feature_ndims, continuous_dims, categorical_dims) without return types