code: def _feature_importances(model):
      """Extract feature importances from fitted boosting models.
  
      Returns
      -------
      array of feature importances.
      """
  
      if hasattr(model, "coef_"):  ## booster='gblinear' (xgb)
          coefs = np.square(model.coef_).sum(axis=0)
      else:
          coefs = model.feature_importances_
  
      return coefs
  
file_path: shap-hypetune/shaphypetune/utils.py
imports: import random
  import numpy
  from itertools import product
  from shap import TreeExplainer
label_desc: Use image node_id 3 for calling a global function with example usage: _feature_importances(model) and returns: coefs