code: def get_patch_map():
      from daal4py.sklearn.monkeypatch.dispatcher import (
          _get_map_of_algorithms,
      )
  
      mapping = _get_map_of_algorithms().copy()
  
      if _is_new_patching_available():
          # Scikit-learn* modules
          import sklearn as base_module
          import sklearn.cluster as cluster_module
          import sklearn.covariance as covariance_module
          import sklearn.decomposition as decomposition_module
          import sklearn.ensemble as ensemble_module
          import sklearn.linear_model as linear_model_module
          import sklearn.neighbors as neighbors_module
          import sklearn.svm as svm_module
  
          if sklearn_check_version("1.2.1"):
              import sklearn.utils.parallel as parallel_module
          else:
              import sklearn.utils.fixes as parallel_module
  
          # Classes and functions for patching
          from ._config import (
              config_context as config_context_sklearnex,
          )
          from ._config import get_config as get_config_sklearnex
          from ._config import set_config as set_config_sklearnex
  
          if sklearn_check_version("1.2.1"):
              from .utils.parallel import (
                  _FuncWrapper as _FuncWrapper_sklearnex,
              )
          else:
              from .utils.parallel import (
                  _FuncWrapperOld as _FuncWrapper_sklearnex,
              )
  
          from .cluster import DBSCAN as DBSCAN_sklearnex
          from .ensemble import (
              ExtraTreesClassifier as ExtraTreesClassifier_sklearnex,
          )
          from .ensemble import (
              ExtraTreesRegressor as ExtraTreesRegressor_sklearnex,
          )
          from .ensemble import (
              RandomForestClassifier as RandomForestClassifier_sklearnex,
          )
          from .ensemble import (
              RandomForestRegressor as RandomForestRegressor_sklearnex,
          )
          from .linear_model import (
              LinearRegression as LinearRegression_sklearnex,
          )
          from .neighbors import (
              KNeighborsClassifier as KNeighborsClassifier_sklearnex,
          )
          from .neighbors import (
              KNeighborsRegressor as KNeighborsRegressor_sklearnex,
          )
          from .neighbors import (
              LocalOutlierFactor as LocalOutlierFactor_sklearnex,
          )
          from .neighbors import (
              NearestNeighbors as NearestNeighbors_sklearnex,
          )
  
          # Preview classes for patching
          from .preview.cluster import KMeans as KMeans_sklearnex
          from .preview.covariance import (
              EmpiricalCovariance as EmpiricalCovariance_sklearnex,
          )
          from .preview.decomposition import PCA as PCA_sklearnex
          from .preview.linear_model import (
              LogisticRegression as LogisticRegression_sklearnex,
          )
          from .svm import SVC as SVC_sklearnex
          from .svm import SVR as SVR_sklearnex
          from .svm import NuSVC as NuSVC_sklearnex
          from .svm import NuSVR as NuSVR_sklearnex
  
          # Patch for mapping
          if _is_preview_enabled():
              # PCA
              mapping.pop("pca")
              mapping["pca"] = [
                  [(decomposition_module, "PCA", PCA_sklearnex), None]
              ]
  
              # KMeans
              mapping.pop("kmeans")
              mapping["kmeans"] = [
                  [
                      (
                          cluster_module,
                          "KMeans",
                          KMeans_sklearnex,
                      ),
                      None,
                  ]
              ]
  
              # Covariance
              mapping["empiricalcovariance"] = [
                  [
                      (
                          covariance_module,
                          "EmpiricalCovariance",
                          EmpiricalCovariance_sklearnex,
                      ),
                      None,
                  ]
              ]
  
              # LogisticRegression
              mapping.pop("logisticregression")
              mapping.pop("log_reg")
              mapping["log_reg"] = [
                  [
                      (
                          linear_model_module,
                          "LogisticRegression",
                          LogisticRegression_sklearnex,
                      ),
                      None,
                  ]
              ]
              mapping["logisticregression"] = mapping["log_reg"]
  
          # DBSCAN
          mapping.pop("dbscan")
          mapping["dbscan"] = [
              [(cluster_module, "DBSCAN", DBSCAN_sklearnex), None]
          ]
  
          # SVM
          mapping.pop("svm")
          mapping.pop("svc")
          mapping["svr"] = [[(svm_module, "SVR", SVR_sklearnex), None]]
          mapping["svc"] = [[(svm_module, "SVC", SVC_sklearnex), None]]
          mapping["nusvr"] = [
              [(svm_module, "NuSVR", NuSVR_sklearnex), None]
          ]
          mapping["nusvc"] = [
              [(svm_module, "NuSVC", NuSVC_sklearnex), None]
          ]
  
          # Linear Regression
          mapping.pop("linear")
          mapping.pop("linearregression")
          mapping["linear"] = [
              [
                  (
                      linear_model_module,
                      "LinearRegression",
                      LinearRegression_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["linearregression"] = mapping["linear"]
  
          # kNN
          mapping.pop("knn_classifier")
          mapping.pop("kneighborsclassifier")
          mapping.pop("knn_regressor")
          mapping.pop("kneighborsregressor")
          mapping.pop("nearest_neighbors")
          mapping.pop("nearestneighbors")
          mapping["knn_classifier"] = [
              [
                  (
                      neighbors_module,
                      "KNeighborsClassifier",
                      KNeighborsClassifier_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["knn_regressor"] = [
              [
                  (
                      neighbors_module,
                      "KNeighborsRegressor",
                      KNeighborsRegressor_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["nearest_neighbors"] = [
              [
                  (
                      neighbors_module,
                      "NearestNeighbors",
                      NearestNeighbors_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["kneighborsclassifier"] = mapping["knn_classifier"]
          mapping["kneighborsregressor"] = mapping["knn_regressor"]
          mapping["nearestneighbors"] = mapping["nearest_neighbors"]
  
          # Ensemble
          mapping["extra_trees_classifier"] = [
              [
                  (
                      ensemble_module,
                      "ExtraTreesClassifier",
                      ExtraTreesClassifier_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["extra_trees_regressor"] = [
              [
                  (
                      ensemble_module,
                      "ExtraTreesRegressor",
                      ExtraTreesRegressor_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["extratreesclassifier"] = mapping[
              "extra_trees_classifier"
          ]
          mapping["extratreesregressor"] = mapping[
              "extra_trees_regressor"
          ]
          mapping.pop("random_forest_classifier")
          mapping.pop("random_forest_regressor")
          mapping.pop("randomforestclassifier")
          mapping.pop("randomforestregressor")
          mapping["random_forest_classifier"] = [
              [
                  (
                      ensemble_module,
                      "RandomForestClassifier",
                      RandomForestClassifier_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["random_forest_regressor"] = [
              [
                  (
                      ensemble_module,
                      "RandomForestRegressor",
                      RandomForestRegressor_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["randomforestclassifier"] = mapping[
              "random_forest_classifier"
          ]
          mapping["randomforestregressor"] = mapping[
              "random_forest_regressor"
          ]
  
          # LocalOutlierFactor
          mapping["lof"] = [
              [
                  (
                      neighbors_module,
                      "LocalOutlierFactor",
                      LocalOutlierFactor_sklearnex,
                  ),
                  None,
              ]
          ]
          mapping["localoutlierfactor"] = mapping["lof"]
  
          # Configs
          mapping["set_config"] = [
              [(base_module, "set_config", set_config_sklearnex), None]
          ]
          mapping["get_config"] = [
              [(base_module, "get_config", get_config_sklearnex), None]
          ]
          mapping["config_context"] = [
              [
                  (
                      base_module,
                      "config_context",
                      config_context_sklearnex,
                  ),
                  None,
              ]
          ]
  
          # Necessary for proper work with multiple threads
          mapping["parallel.get_config"] = [
              [
                  (parallel_module, "get_config", get_config_sklearnex),
                  None,
              ]
          ]
          mapping["_funcwrapper"] = [
              [
                  (
                      parallel_module,
                      "_FuncWrapper",
                      _FuncWrapper_sklearnex,
                  ),
                  None,
              ]
          ]
      return mapping
  
file_path: scikit-learn-intelex/sklearnex/dispatcher.py
imports: import os
  import sys
  from functools import lru_cache
  from daal4py.sklearn._utils import daal_check_version, sklearn_check_version
label_desc: Use image node_id 3 for calling a global function with example usage: get_patch_map() and returns: mapping