code: def testInverseGammaMeanNanStats(self):
      # Mode will not be defined for the first two entries.
      alpha_v = np.array([0.5, 1.0, 3.0, 2.5])
      beta_v = np.array([1.0, 2.0, 4.0, 5.0])
      inv_gamma = inverse_gamma.InverseGamma(
          concentration=alpha_v,
          scale=beta_v,
          allow_nan_stats=True,
          validate_args=True,
      )
      expected_means = beta_v / (alpha_v - 1)
      expected_means[0] = np.nan
      expected_means[1] = np.nan
      self.assertEqual(inv_gamma.mean().shape, (4,))
      self.assertAllClose(
          self.evaluate(inv_gamma.mean()), expected_means
      )
  
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 10 for calling the InverseGammaTest obj's underlying member method code with example usage: obj.testInverseGammaMeanNanStats() without return types