code: def _kstest(self, loc, scale, conc, samples):
      # Uses the Kolmogorov-Smirnov test for goodness of fit.
      ks, _ = sp_stats.kstest(
          samples, sp_stats.genpareto(conc, loc=loc, scale=scale).cdf
      )
      # Return True when the test passes.
      return ks < 0.02
  
imports: import hypothesis
  import hypothesis.strategies
  import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import generalized_pareto
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 13 for calling the GeneralizedParetoTest obj's underlying member method code with example usage: obj._kstest(loc, scale, conc, samples) and returns: unknown