code: def testExponentialSampleMultiDimensional(self):
      batch_size = 2
      lam_v = [3.0, 22.0]
      lam = tf.constant([lam_v] * batch_size)
  
      dist = exponential.Exponential(rate=lam, validate_args=True)
  
      n = 100000
      samples = dist.sample(n, seed=test_util.test_seed())
      self.assertEqual(samples.shape, (n, batch_size, 2))
  
      sample_values = self.evaluate(samples)
  
      self.assertFalse(np.any(sample_values < 0.0))
      for i in range(2):
          self.assertLess(
              sp_stats.kstest(
                  sample_values[:, 0, i],
                  sp_stats.expon(scale=1.0 / lam_v[i]).cdf,
              )[0],
              0.01,
          )
          self.assertLess(
              sp_stats.kstest(
                  sample_values[:, 1, i],
                  sp_stats.expon(scale=1.0 / lam_v[i]).cdf,
              )[0],
              0.01,
          )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 9 for calling the ExponentialTest obj's underlying member method code with example usage: obj.testExponentialSampleMultiDimensional() without return types