code: def test_smoothing_misfit(self, kernel):
      # Make sure we can find a smoothing parameter for each kernel that
      # removes a sufficient amount of noise.
      rng = np.random.RandomState(0)
      seq = Halton(1, scramble=False, seed=rng)
  
      noise = 0.2
      rmse_tol = 0.1
      smoothing_range = 10 ** np.linspace(-4, 1, 20)
  
      x = 3 * seq.random(100)
      y = _1d_test_function(x) + rng.normal(0.0, noise, (100,))
      ytrue = _1d_test_function(x)
      rmse_within_tol = False
      for smoothing in smoothing_range:
          ysmooth = self.build(
              x, y, epsilon=1.0, smoothing=smoothing, kernel=kernel
          )(x)
          rmse = np.sqrt(np.mean((ysmooth - ytrue) ** 2))
          if rmse < rmse_tol:
              rmse_within_tol = True
              break
  
      assert rmse_within_tol
  
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 9 for calling the _TestRBFInterpolator obj's underlying member method code with example usage: obj.test_smoothing_misfit(kernel) without return types