code: def mean_kl_divergence(
      y_proba_pred, y_proba_target, sample_weight=None, eps=1e-9
  ):
      kl_elementwise = entropy(y_proba_target.T, y_proba_pred.T + eps)
      return np.average(kl_elementwise, weights=sample_weight)
  
imports: from __future__ import absolute_import
  from typing import List, Any
  import numpy
  from scipy.stats import entropy
  from sklearn.pipeline import Pipeline
  from sklearn.utils import check_random_state, issparse
  from sklearn.utils.metaestimators import if_delegate_has_method
  from sklearn.utils import shuffle
  from eli5.utils import vstack
  from eli5.sklearn.utils import sklearn_version
label_desc: Use image node_id 9 for calling a global function with example usage: mean_kl_divergence(y_proba_pred, y_proba_target, sample_weight, eps) and returns: np