code: def testInverseGammaPdfOfSampleMultiDims(self):
      inv_gamma = inverse_gamma.InverseGamma(
          concentration=[7.0, 11.0],
          scale=[[5.0], [6.0]],
          validate_args=True,
      )
      num = 50000
      samples = inv_gamma.sample(num, seed=test_util.test_seed())
      pdfs = inv_gamma.prob(samples)
      sample_vals, pdf_vals = self.evaluate([samples, pdfs])
      self.assertEqual(samples.shape, (num, 2, 2))
      self.assertEqual(pdfs.shape, (num, 2, 2))
      self.assertAllClose(
          stats.invgamma.mean(
              [[7.0, 11.0], [7.0, 11.0]],
              scale=np.array([[5.0, 5.0], [6.0, 6.0]]),
          ),
          sample_vals.mean(axis=0),
          atol=0.1,
      )
      self.assertAllClose(
          stats.invgamma.var(
              [[7.0, 11.0], [7.0, 11.0]],
              scale=np.array([[5.0, 5.0], [6.0, 6.0]]),
          ),
          sample_vals.var(axis=0),
          atol=0.1,
      )
      self._assertIntegral(
          sample_vals[:, 0, 0], pdf_vals[:, 0, 0], err=0.02
      )
      self._assertIntegral(
          sample_vals[:, 0, 1], pdf_vals[:, 0, 1], err=0.02
      )
      self._assertIntegral(
          sample_vals[:, 1, 0], pdf_vals[:, 1, 0], err=0.02
      )
      self._assertIntegral(
          sample_vals[:, 1, 1], pdf_vals[:, 1, 1], err=0.02
      )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 19 for calling the InverseGammaTest obj's underlying member method code with example usage: obj.testInverseGammaPdfOfSampleMultiDims() without return types