code: def test_full_adapt_sample_p(seed=4566):
      # ref: https://github.com/stan-dev/stan/pull/2672
      np.random.seed(seed)
      m = np.array([[3.0, -2.0], [-2.0, 4.0]])
      m_inv = np.linalg.inv(m)
  
      var = np.array(
          [
              [2 * m[0, 0], m[1, 0] * m[1, 0] + m[1, 1] * m[0, 0]],
              [m[0, 1] * m[0, 1] + m[1, 1] * m[0, 0], 2 * m[1, 1]],
          ]
      )
  
      n_samples = 1000
      with pytest.warns(UserWarning, match="experimental feature"):
          pot = quadpotential.QuadPotentialFullAdapt(
              2, np.zeros(2), m_inv, 1
          )
      samples = [pot.random() for n in range(n_samples)]
      sample_cov = np.cov(samples, rowvar=0)
  
      # Covariance matrix within 5 sigma of expected value
      # (comes from a Wishart distribution)
      assert np.all(
          np.abs(m - sample_cov) < 5 * np.sqrt(var / n_samples)
      )
  
imports: import warnings
  import numpy
  import numpy.testing
  import pytest
  import scipy.sparse
  import pymc
  from pymc.pytensorf import floatX
  from pymc.step_methods.hmc import quadpotential
label_desc: Use image node_id 10 for calling a global function with example usage: test_full_adapt_sample_p(seed) without return types