docstr: Compare HSGPPeriodic prior to unapproximated GP prior, pm.gp.Latent. Draw samples from the
  prior and compare them using MMD two sample test.
docstr_tok: ["Compare","HSGPPeriodic","prior","to","unapproximated","GP","prior",",","pm.gp.Latent",".","Draw","samples","from","the","prior","and","compare","them","using","MMD","two","sample","test","."]
code: def test_prior(self, model, cov_func, eta, X1, rng):
      """Compare HSGPPeriodic prior to unapproximated GP prior, pm.gp.Latent. Draw samples from the
      prior and compare them using MMD two sample test.
      """
      with model:
          hsgp = pm.gp.HSGPPeriodic(m=200, scale=eta, cov_func=cov_func)
          f1 = hsgp.prior("f1", X=X1)
  
          gp = pm.gp.Latent(cov_func=eta**2 * cov_func)
          f2 = gp.prior("f2", X=X1)
  
          idata = pm.sample_prior_predictive(
              samples=1000, random_seed=rng
          )
  
      samples1 = az.extract(idata.prior["f1"])["f1"].values.T
      samples2 = az.extract(idata.prior["f2"])["f2"].values.T
  
      h0, mmd, critical_value, reject = two_sample_test(
          samples1, samples2, n_sims=500, alpha=0.01
      )
      assert (
          not reject
      ), f"H0 was rejected, {mmd} even though HSGP and GP priors should match."
  
imports: import arviz
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from scipy.spatial import distance
  import pymc
label_desc: Use image node_id 2 for calling the TestHSGPPeriodic obj's underlying member method code with example usage: obj.test_prior(model, cov_func, eta, X1, rng) without return types