code: def test_smoothconf(self):
      kern_name = self.kern_name
      kern = self.kern
      # fittedg = np.array([kernels.Epanechnikov().smoothconf(x, y, xi) for xi in xg])
      fittedg = np.array([kern.smoothconf(x, y, xi) for xi in xg])
      # attach for inspection from outside of test run
      self.fittedg = fittedg
  
      res_fitted = results["s_" + kern_name]
      res_se = results["se_" + kern_name]
      crit = 1.9599639845400545  # norm.isf(0.05 / 2)
      # implied standard deviation from conf_int
      se = (fittedg[:, 2] - fittedg[:, 1]) / crit
      fitted = fittedg[:, 1]
  
      # check both rtol & atol
      assert_allclose(fitted, res_fitted, rtol=5e-7, atol=1e-20)
      assert_allclose(fitted, res_fitted, rtol=0, atol=1e-6)
  
      # TODO: check we are using a different algorithm for se
      # The following are very rough checks
  
      self.se = se
      self.res_se = res_se
      se_valid = np.isfinite(res_se)
      # if np.any(~se_valid):
      #    print('nan in stata result', self.__class__.__name__)
      assert_allclose(
          se[se_valid], res_se[se_valid], rtol=self.se_rtol, atol=0.2
      )
      # check that most values are closer
      mask = np.abs(se - res_se) > (0.2 + 0.2 * res_se)
      if not hasattr(self, "se_n_diff"):
          se_n_diff = 40 * 0.125
      else:
          se_n_diff = self.se_n_diff
      assert_array_less(
          mask.sum(), se_n_diff + 1
      )  # at most 5 large diffs
  
      # Stata only displays ci, does not save it
      res_upp = res_fitted + crit * res_se
      res_low = res_fitted - crit * res_se
      self.res_fittedg = np.column_stack((res_low, res_fitted, res_upp))
      assert_allclose(
          fittedg[se_valid, 2],
          res_upp[se_valid],
          rtol=self.upp_rtol,
          atol=0.2,
      )
      assert_allclose(
          fittedg[se_valid, 0],
          res_low[se_valid],
          rtol=self.low_rtol,
          atol=self.low_atol,
      )
  
imports: import os
  import numpy
  from numpy.testing import assert_allclose, assert_array_less
  import pandas
  import pytest
  from statsmodels.sandbox.nonparametric import kernels
label_desc: Use image node_id 1 for calling the CheckKernelMixin obj's underlying member method code with example usage: obj.test_smoothconf() without return types