class_docstr: KNearestNeighbors model (scikit-learn): https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html
class_docstr_tok: ["KNearestNeighbors","model","(","scikit-learn",")",":","https",":","\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.neighbors.KNeighborsClassifier.html"]
code: def _get_model_type(self):
      if self.params_aux.get("use_daal", True):
          try:
              # TODO: Add more granular switch, currently this affects all future KNN models even if they had `use_daal=False`
              from sklearnex.neighbors import (
                  KNeighborsClassifier,
                  KNeighborsRegressor,
              )
  
              # sklearnex backend for KNN seems to be 20-40x+ faster than native sklearn with no downsides.
              logger.log(15, "\tUsing sklearnex KNN backend...")
          except:
              from sklearn.neighbors import (
                  KNeighborsClassifier,
                  KNeighborsRegressor,
              )
      else:
          from sklearn.neighbors import (
              KNeighborsClassifier,
              KNeighborsRegressor,
          )
      if self.problem_type == REGRESSION:
          return KNeighborsRegressor
      else:
          return KNeighborsClassifier
  
imports: import logging
  import math
  import time
  from typing import Dict, Union
  import numpy
  from autogluon.common.features.types import R_FLOAT, R_INT, S_BOOL
  from autogluon.common.utils.resource_utils import ResourceManager
  from autogluon.core.constants import BINARY, MULTICLASS, REGRESSION
  from autogluon.core.models import AbstractModel
  from autogluon.core.utils.exceptions import NotEnoughMemoryError
  from autogluon.core.utils.utils import normalize_pred_probas
label_desc: Use image node_id 2 for calling the KNNModel obj's underlying member method code with example usage: obj._get_model_type() and returns: KNeighborsRegressor, KNeighborsClassifier