code: def _get_daal_params(self, data):
      class_count = 0 if self.classes_ is None else len(self.classes_)
      weights = getattr(self, "weights", "uniform")
      params = {
          "fptype": "float" if data.dtype == np.float32 else "double",
          "method": "defaultDense",
          "k": self.n_neighbors,
          "voteWeights": "voteUniform"
          if weights == "uniform"
          else "voteDistance",
          "resultsToCompute": "computeIndicesOfNeighbors|computeDistances",
          "resultsToEvaluate": "none"
          if getattr(self, "_y", None) is None or _is_regressor(self)
          else "computeClassLabels",
      }
      if class_count != 0:
          params["nClasses"] = class_count
      return params
  
imports: from abc import ABCMeta
  from numbers import Integral
  import numpy
  from daal4py import bf_knn_classification_prediction, bf_knn_classification_training, kdtree_knn_classification_prediction, kdtree_knn_classification_training
  from onedal import _backend
  from ..common._estimator_checks import _check_is_fitted, _is_classifier, _is_regressor
  from ..common._mixin import ClassifierMixin, RegressorMixin
  from ..common._policy import _get_policy
  from ..datatypes import _convert_to_supported, from_table, to_table
  from ..utils import _check_array, _check_classification_targets, _check_n_features, _check_X_y, _column_or_1d, _num_samples
label_desc: Use image node_id 6 for calling the NeighborsCommonBase obj's underlying member method code with example usage: obj._get_daal_params(data) and returns: params