code: def _pandas_compute_importance(
      data,
      target: str,
      preprocess_func=None,
      estimator=None,
      truncate: bool = True,
      **kwargs,
  ):
      """Computes importance using permutation importance.
  
      Uses Random Forest Classifier by default
  
      Args:
          data: A Pandas data frame
          target: Name of the response column, as a string
          preprocess_func: A custom preprocessing function that takes a Pandas dataframe
              and the target/response column as a string. Returns X and y as tuple
          estimator: A custom sklearn estimator. Default is Random Forest Classifier
          truncate: If True, negative importance values will be truncated (set to zero)
          **kwargs: Other arguments to be passed to the preprocess function
  
      Returns:
          importance_values: The importances
          idx: The sorted index of importance_values
          X.columns: The columns
      """
      if estimator is None:
          estimator = RandomForestClassifier(random_state=1)
  
      if preprocess_func is None:
          X, y = preprocess(data, target, **kwargs)
      else:
          X, y = preprocess_func(data, target, **kwargs)
  
      estimator.fit(X, y)
      pi = permutation_importance(
          estimator, X, y, n_repeats=5, random_state=1
      )
  
      importance_values = np.array(
          [max(0, x) if truncate else x for x in pi.importances_mean]
      )
      idx = importance_values.argsort()[::-1]
  
      return importance_values, idx, X.columns
  
file_path: data-describe/data_describe/core/importance.py
imports: from typing import Optional
  import numpy
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.inspection import permutation_importance
  import seaborn
  import matplotlib.pyplot
  from data_describe.config._config import get_option
  from data_describe.misc.preprocessing import preprocess
  from data_describe.backends import _get_viz_backend, _get_compute_backend
label_desc: Use image node_id 2 for calling a global function with example usage: _pandas_compute_importance(data, target, preprocess_func, estimator, truncate) and returns: importance_values,  idx,  X