code: def testSampleKolmogorovSmirnovMultiDimensional(self):
      loc = np.linspace(-10, 10, 3).reshape([3, 1, 1])
      scale = np.linspace(1e-6, 7, 5).reshape([5, 1])
      conc = np.linspace(-1.3, 1.3, 7)
  
      dist = gp.GeneralizedPareto(
          loc=loc, scale=scale, concentration=conc, validate_args=True
      )
      n = 10**4
      samples = dist.sample(n, seed=test_util.test_seed())
      sample_values = self.evaluate(samples)
      self.assertEqual((n, 3, 5, 7), samples.shape)
      self.assertEqual((n, 3, 5, 7), sample_values.shape)
  
      fails = 0
      trials = 0
      for li, l in enumerate(loc.reshape(-1)):
          for si, s in enumerate(scale.reshape(-1)):
              for ci, c in enumerate(conc.reshape(-1)):
                  samps = sample_values[:, li, si, ci]
                  trials += 1
                  fails += 0 if self._kstest(l, s, c, samps) else 1
      self.assertLess(fails, trials * 0.03)
  
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 12 for calling the GeneralizedParetoTest obj's underlying member method code with example usage: obj.testSampleKolmogorovSmirnovMultiDimensional() without return types