code: def _catb_feature_importance(catb, importance_type, pool=None):
      if importance_type == "PredictionValuesChange":
          fs = catb.get_feature_importance(type=importance_type)
      elif importance_type == "LossFunctionChange":
          if isinstance(pool, catboost.Pool):
              fs = catb.get_feature_importance(
                  data=pool, type=importance_type
              )
          else:
              raise ValueError(
                  'importance_type: "LossFunctionChange" requires catboost.Pool '
                  "datatype to be passed with parameter pool to calculate "
                  "metric. Either no datatype or invalid datatype was passed"
              )
      else:
          raise ValueError(
              'Only two importance_type "PredictionValuesChange" '
              'and "LossFunctionChange" are supported. Invalid Parameter '
              "{} for importance_type".format(importance_type)
          )
      all_features = np.array(fs, dtype=np.float32)
      return all_features / all_features.sum()
  
file_path: eli5/eli5/catboost.py
imports: from __future__ import absolute_import, division
  import numpy
  import catboost
  from eli5.explain import explain_weights
  from eli5._feature_importances import get_feature_importance_explanation
label_desc: Use image node_id 3 for calling a global function with example usage: _catb_feature_importance(catb, importance_type, pool) and returns: unknown