code: def _compute_mi(x, y, x_discrete, y_discrete, n_neighbors=3):
      """Compute mutual information between two variables.
  
      This is a simple wrapper which selects a proper function to call based on
      whether `x` and `y` are discrete or not.
      """
      if x_discrete and y_discrete:
          return mutual_info_score(x, y)
      elif x_discrete and not y_discrete:
          return _compute_mi_cd(y, x, n_neighbors)
      elif not x_discrete and y_discrete:
          return _compute_mi_cd(x, y, n_neighbors)
      else:
          return _compute_mi_cc(x, y, n_neighbors)
  
file_path: catboost/contrib/python/scikit-learn/py3/sklearn/feature_selection/_mutual_info.py
imports: from numbers import Integral
  import numpy
  from scipy.sparse import issparse
  from scipy.special import digamma
  from ..metrics.cluster import mutual_info_score
  from ..neighbors import KDTree, NearestNeighbors
  from ..preprocessing import scale
  from ..utils import check_random_state
  from ..utils._param_validation import Interval, StrOptions, validate_params
  from ..utils.multiclass import check_classification_targets
  from ..utils.validation import check_array, check_X_y
label_desc: Use image node_id 3 for calling a global function with example usage: _compute_mi(x, y, x_discrete, y_discrete, n_neighbors) and returns: mutual_info_score, _compute_mi_cd, _compute_mi_cd, _compute_mi_cc