code: def testParetoParetoKLFinite(self):
      a_scale = np.arange(1.0, 5.0)
      a_concentration = 1.0
      b_scale = 1.0
      b_concentration = np.arange(2.0, 10.0, 2)
  
      a = pareto.Pareto(
          concentration=a_concentration,
          scale=a_scale,
          validate_args=True,
      )
      b = pareto.Pareto(
          concentration=b_concentration,
          scale=b_scale,
          validate_args=True,
      )
  
      true_kl = (
          b_concentration * (np.log(a_scale) - np.log(b_scale))
          + np.log(a_concentration)
          - np.log(b_concentration)
          + b_concentration / a_concentration
          - 1.0
      )
      kl = kullback_leibler.kl_divergence(a, b)
  
      x = a.sample(
          int(3e5),
          seed=test_util.test_seed(
              hardcoded_seed=0, set_eager_seed=False
          ),
      )
      kl_samples = a.log_prob(x) - b.log_prob(x)
  
      kl_, kl_samples_ = self.evaluate([kl, kl_samples])
      self.assertAllClose(kl_, true_kl, atol=2e-15)
      self.assertAllMeansClose(
          kl_samples_, true_kl, axis=0, atol=0.0, rtol=1e-2
      )
  
      zero_kl = kullback_leibler.kl_divergence(a, a)
      true_zero_kl_, zero_kl_ = self.evaluate(
          [tf.zeros_like(true_kl), zero_kl]
      )
      self.assertAllEqual(true_zero_kl_, zero_kl_)
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import pareto
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 23 for calling the ParetoTest obj's underlying member method code with example usage: obj.testParetoParetoKLFinite() without return types