code: def _kstest(self, alpha, beta, samples):
      # Uses the Kolmogorov-Smirnov test for goodness of fit.
      if not stats:
          return True  # If we can't test, return that the test passes.
      ks, _ = stats.kstest(
          samples, stats.gamma(alpha, scale=1 / beta).cdf
      )
      # Return True when the test passes.
      return ks < 0.02
  
imports: import importlib
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops.distributions import gamma
  from tensorflow.python.ops.distributions import kullback_leibler
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 18 for calling the GammaTest obj's underlying member method code with example usage: obj._kstest(alpha, beta, samples) and returns: unknown, True