code: def _kstest(self, alpha, beta, samples):
      # Uses the Kolmogorov-Smirnov test for goodness of fit.
      ks, _ = stats.kstest(
          samples, stats.invgamma(alpha, scale=beta).cdf
      )
      # Return True when the test passes.
      return ks < 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 18 for calling the InverseGammaTest obj's underlying member method code with example usage: obj._kstest(alpha, beta, samples) and returns: unknown