code: def auto_estimate_kl_divergence(
      X: np.ndarray, Y: np.ndarray
  ) -> float:
      if is_categorical(X):
          return estimate_kl_divergence_categorical(X, Y)
      elif not has_categorical(X) and is_probability_matrix(X):
          return estimate_kl_divergence_of_probabilities(X, Y)
      else:
          if X.ndim == 2 and X.shape[1] > 1:
              return estimate_kl_divergence_continuous_clf(X, Y)
          else:
              return estimate_kl_divergence_continuous_knn(X, Y)
  
file_path: dowhy/dowhy/gcm/divergence.py
imports: from functools import partial
  from typing import Callable, Union
  import numpy
  from scipy.stats import entropy
  from sklearn.model_selection import KFold
  from sklearn.neighbors import NearestNeighbors
  from dowhy.gcm.auto import AssignmentQuality, select_model
  from dowhy.gcm.constant import EPS
  from dowhy.gcm.ml.classification import ClassificationModel, create_logistic_regression_classifier
  from dowhy.gcm.util.general import has_categorical, is_categorical, setdiff2d, shape_into_2d
label_desc: Use image node_id 1 for calling a global function with example usage: auto_estimate_kl_divergence(X, Y) and returns: estimate_kl_divergence_categorical, estimate_kl_divergence_of_probabilities, estimate_kl_divergence_continuous_clf, estimate_kl_divergence_continuous_knn