code: def test_sample(self):
      num_samples = 2**20
  
      for bw in [1e-1, 5e-1, 1]:
          hp_kernel = hp_kernels.AitchisonAitken(
              data=self.x_train,
              bandwidth=bw,
              num_values=len(
                  self.configspace.get_hyperparameters()[0].choices
              ),
          )
  
          samples = hp_kernel.sample(num_samples=num_samples)
  
          phat1, phat2 = [], []
  
          for value in [0, 1, 2]:
              phat1.append(np.sum(samples == value) / num_samples)
              phat2.append(hp_kernel(np.array([value])).mean(axis=0)[0])
  
          for p1, p2 in zip(phat1, phat2):
              self.assertAlmostEqual(p1, p2, delta=5e-3)
  
          self.assertAlmostEqual(np.sum(phat2), 1, delta=1e-5)
  
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 Test1dCategorical obj's underlying member method code with example usage: obj.test_sample() without return types