code: def testAssertsValidImmutableParams(self):
      with self.assertRaisesOpError(
          "`concentration` must be non-negative"
      ):
          pspherical = power_spherical.PowerSpherical(
              mean_direction=tf.math.l2_normalize([1.0, 2, 3], axis=-1),
              concentration=-1.0,
              validate_args=True,
              allow_nan_stats=False,
          )
          self.evaluate(pspherical.mean())
  
      with self.assertRaisesOpError(
          "`mean_direction` must be a vector of at least size 2"
      ):
          pspherical = power_spherical.PowerSpherical(
              mean_direction=[1.0],
              concentration=0.0,
              validate_args=True,
              allow_nan_stats=False,
          )
          self.evaluate(pspherical.mean())
  
      with self.assertRaisesOpError(
          "`mean_direction` must be unit-length"
      ):
          pspherical = power_spherical.PowerSpherical(
              mean_direction=tf.convert_to_tensor([1.0, 2, 3]),
              concentration=1.0,
              validate_args=True,
              allow_nan_stats=False,
          )
          self.evaluate(pspherical.mean())
  
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 22 for calling the _PowerSphericalTest obj's underlying member method code with example usage: obj.testAssertsValidImmutableParams() without return types