code: def test_pdf_boundary_simple(self):
      self.x_train = np.array([0])
      for bw in [1e-3, 1e-2, 1e-1]:
          # note: for larger bandwidths, the pdf also needs to be truncated as +1,
          # which leads to something different than twice the pdf
  
          hp_kernel1 = hp_kernels.Gaussian(
              data=self.x_train, bandwidth=bw, fix_boundary=False
          )
          hp_kernel2 = hp_kernels.Gaussian(
              data=self.x_train, bandwidth=bw, fix_boundary=True
          )
  
          hp_values1 = hp_kernel1(self.x_test)
          hp_values2 = hp_kernel2(self.x_test)
          self.assertTrue(np.allclose(2 * hp_values1, hp_values2, 1e-4))
  
      self.x_train = np.array([1])
      for bw in [1e-3, 1e-2, 1e-1]:
          # note: for larger bandwidths, the pdf also needs to be truncated as +1,
          # which leads to something different than twice the pdf
  
          hp_kernel1 = hp_kernels.Gaussian(
              data=self.x_train, bandwidth=bw, fix_boundary=False
          )
          hp_kernel2 = hp_kernels.Gaussian(
              data=self.x_train, bandwidth=bw, fix_boundary=True
          )
  
          hp_values1 = hp_kernel1(self.x_test)
          hp_values2 = hp_kernel2(self.x_test)
  
          self.assertTrue(np.allclose(2 * hp_values1, hp_values2, 1e-4))
  
      # simple test based on 68, 95, 99% rule
      self.x_train = np.array([0.5])
      for bw, w in ([0.5, 0.6827], [0.25, 0.9545], [1 / 6, 0.9973]):
          hp_kernel = hp_kernels.Gaussian(
              data=self.x_train, bandwidth=bw, fix_boundary=True
          )
          self.assertAlmostEqual(
              hp_kernel.weights[0], 1 / w, delta=1e-4
          )
  
imports: import os
  import unittest
  import numpy
  from scipy.integrate import quad
  from statsmodels.nonparametric import kernels
  from hpbandster.optimizers.kde import kernels
  import ConfigSpace
  from pdb import set_trace
label_desc: Use image node_id 4 for calling the TestGaussian obj's underlying member method code with example usage: obj.test_pdf_boundary_simple() without return types