code: def test_polynomial_reproduction(self):
      # If the observed data comes from a polynomial, then the interpolant
      # should be able to reproduce the polynomial exactly, provided that
      # `degree` is sufficiently high.
      rng = np.random.RandomState(0)
      seq = Halton(2, scramble=False, seed=rng)
      degree = 3
  
      x = seq.random(50)
      xitp = seq.random(50)
  
      P = _vandermonde(x, degree)
      Pitp = _vandermonde(xitp, degree)
  
      poly_coeffs = rng.normal(0.0, 1.0, P.shape[1])
  
      y = P.dot(poly_coeffs)
      yitp1 = Pitp.dot(poly_coeffs)
      yitp2 = self.build(x, y, degree=degree)(xitp)
  
      assert_allclose(yitp1, yitp2, atol=1e-8)
  
imports: import pickle
  import pytest
  import numpy
  from numpy.linalg import LinAlgError
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy.stats.qmc import Halton
  from scipy.spatial import cKDTree
  from scipy.interpolate._rbfinterp import _AVAILABLE, _SCALE_INVARIANT, _NAME_TO_MIN_DEGREE, _monomial_powers, RBFInterpolator
  from scipy.interpolate import _rbfinterp_pythran
label_desc: Use image node_id 4 for calling the _TestRBFInterpolator obj's underlying member method code with example usage: obj.test_polynomial_reproduction() without return types