code: def test_kernels_weights(self, case):
      name, bw = case
      rvs = self.rvs
      x = self.x_plot
  
      kde2 = kern.pdf_kernel_asym(x, rvs, bw, name)
      kce2 = kern.cdf_kernel_asym(x, rvs, bw, name)
  
      n = len(rvs)
      w = np.ones(n) / n
      kde1 = kern.pdf_kernel_asym(x, rvs, bw, name, weights=w)
      kce1 = kern.cdf_kernel_asym(x, rvs, bw, name, weights=w)
  
      assert_allclose(kde1, kde2, rtol=1e-12)
      assert_allclose(kce1, kce2, rtol=1e-12)
  
      # weights that do not add to 1 are valid, but do not produce pdf, cdf
      n = len(rvs)
      w = np.ones(n) / n * 2
      kde1 = kern.pdf_kernel_asym(x, rvs, bw, name, weights=w)
      kce1 = kern.cdf_kernel_asym(x, rvs, bw, name, weights=w)
  
      assert_allclose(kde1, kde2 * 2, rtol=1e-12)
      assert_allclose(kce1, kce2 * 2, rtol=1e-12)
  
imports: import numpy
  from numpy.testing import assert_allclose, assert_array_less
  from scipy import stats
  import pytest
  import statsmodels.nonparametric.kernels_asymmetric
label_desc: Use image node_id 3 for calling the CheckKernels obj's underlying member method code with example usage: obj.test_kernels_weights(case) without return types