code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
  
      self.logger.info("Using KernelDensitySampler for do sampling.")
      if (
          len(self._data) > 300
          or max(
              len(
                  self._treatment_names
                  + self._target_estimand.get_backdoor_variables()
              ),
              len(
                  self._outcome_names
                  + self._target_estimand.get_backdoor_variables()
              ),
          )
          >= 3
      ):
          self.defaults = EstimatorSettings(n_jobs=4, efficient=True)
      else:
          self.defaults = EstimatorSettings(n_jobs=-1, efficient=False)
  
      if "c" not in self._variable_types.values():
          self.bw = "cv_ml"
      else:
          self.bw = "normal_reference"
  
      self.sampler = self._construct_sampler()
  
file_path: dowhy/dowhy/do_samplers/kernel_density_sampler.py
imports: import numpy
  from scipy.interpolate import interp1d
  from statsmodels.nonparametric.kernel_density import EstimatorSettings, KDEMultivariateConditional
  from dowhy.do_sampler import DoSampler
label_desc: Use image node_id 1 to create a new KernelDensitySampler object from inherited base classes: DoSampler with example: obj = KernelDensitySampler()