code: def testSampleMultiDimensional(self):
      n_concentration = 50
      concentration_v = np.array(
          [np.arange(1, n_concentration + 1, dtype=np.float32)]
      )  # 1 x 50
      n_rate = 10
      rate_v = np.array(
          [np.arange(1, n_rate + 1, dtype=np.float32)]
      ).T  # 10 x 1
      d = exp_gamma_lib.ExpGamma(
          concentration=concentration_v, rate=rate_v, validate_args=True
      )
  
      n = 10000
  
      samples = d.sample(n, seed=test_util.test_seed())
      sample_values = self.evaluate(samples)
  
      self.assertEqual(samples.shape, (n, n_rate, n_concentration))
      self.assertEqual(
          sample_values.shape, (n, n_rate, n_concentration)
      )
      self.assertAllClose(
          sample_values.mean(axis=0), d.mean(), rtol=0.2
      )
      self.assertAllClose(
          sample_values.var(axis=0), d.variance(), rtol=0.09
      )
      fails = 0
      trials = 0
      for ai, a in enumerate(np.reshape(concentration_v, [-1])):
          for bi, b in enumerate(np.reshape(rate_v, [-1])):
              s = sample_values[:, bi, ai]
              trials += 1
              fails += 0 if self._kstest(a, b, s) else 1
      self.assertLess(fails, trials * 0.03)
  
imports: from absl.testing import parameterized
  import numpy
  from scipy import misc
  from scipy import special
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.distributions import exp_gamma
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 17 for calling the ExpGammaTest obj's underlying member method code with example usage: obj.testSampleMultiDimensional() without return types