code: def VerifyPowerSphericalVonMisesFisherKL(self, dim):
      seed_stream = test_util.test_seed_stream()
      mean_direction1 = tf.random.uniform(
          shape=[5, dim],
          minval=self.dtype(1.0),
          maxval=self.dtype(2.0),
          dtype=self.dtype,
          seed=seed_stream(),
      )
      mean_direction2 = tf.random.uniform(
          shape=[5, dim],
          minval=self.dtype(1.0),
          maxval=self.dtype(2.0),
          dtype=self.dtype,
          seed=seed_stream(),
      )
  
      mean_direction1 = tf.nn.l2_normalize(mean_direction1, axis=-1)
      mean_direction2 = tf.nn.l2_normalize(mean_direction2, axis=-1)
      concentration1 = tf.math.log(
          tf.random.uniform(
              shape=[2, 1],
              minval=self.dtype(1.0),
              maxval=self.dtype(100.0),
              dtype=self.dtype,
              seed=seed_stream(),
          )
      )
      concentration2 = tf.math.log(
          tf.random.uniform(
              shape=[2, 1],
              minval=self.dtype(1.0),
              maxval=self.dtype(100.0),
              dtype=self.dtype,
              seed=seed_stream(),
          )
      )
  
      ps = power_spherical.PowerSpherical(
          mean_direction=mean_direction1, concentration=concentration1
      )
      vmf = von_mises_fisher.VonMisesFisher(
          mean_direction=mean_direction2, concentration=concentration2
      )
      x = ps.sample(int(6e4), seed=test_util.test_seed())
  
      kl_samples = ps.log_prob(x) - vmf.log_prob(x)
      true_kl = kullback_leibler.kl_divergence(ps, vmf)
      true_kl_, kl_samples_ = self.evaluate([true_kl, kl_samples])
      self.assertAllMeansClose(
          kl_samples_, true_kl_, axis=0, atol=0.0, rtol=7e-2
      )
  
imports: import numpy
  from scipy import special
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import power_spherical
  from tensorflow_probability.python.distributions import spherical_uniform
  from tensorflow_probability.python.distributions import von_mises_fisher
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.stats import sample_stats
label_desc: Use image node_id 34 for calling the _PowerSphericalTest obj's underlying member method code with example usage: obj.VerifyPowerSphericalVonMisesFisherKL(dim) without return types