class_docstr: Fits and predicts the target on the test dataset.
  
  The test dataset must not contain the target values.
  
  Parameters
  ----------
  to_path : str, default = "save"
      Name of the folder where feature importances and
      predictions are saved (.png and .csv formats).
      Must contain target encoder object (for classification task only).
  
  verbose : bool, default = True
      Verbose mode
docstr: Saves feature importances plot
  
  Parameters
  ----------
  importance : dict
      Dictionary with features (key) and importances (values)
  
  fig_name : str, default = "feature_importance.png"
      figure name
  
  Returns
  -------
  NoneType
      None
docstr_tok: ["Saves","feature","importances","plot","Parameters","--","--","--","--","--","importance",":","dict","Dictionary","with","features","(","key",")","and","importances","(","values",")","fig_name",":","str",",","default","=","``","feature_importance.png","''","figure","name","Returns","--","--","--","-","NoneType","None"]
code: def __save_feature_importances(
      self, importance, fig_name="feature_importance.png"
  ):
      """Saves feature importances plot
  
      Parameters
      ----------
      importance : dict
          Dictionary with features (key) and importances (values)
  
      fig_name : str, default = "feature_importance.png"
          figure name
  
      Returns
      -------
      NoneType
          None
      """
  
      if len(importance) > 0:
          # Generates plot of feature importances
  
          importance_sum = np.sum(list(importance.values()))
          tuples = [
              (k, np.round(importance[k] * 100.0 / importance_sum, 2))
              for k in importance
          ]
          tuples = sorted(tuples, key=lambda x: x[1])
          labels, values = zip(*tuples)
          plt.figure(figsize=(20, int(len(importance) * 0.3) + 1))
  
          ylocs = np.arange(len(values))
          plt.barh(ylocs, values, align="center")
  
          for x, y in zip(values, ylocs):
              plt.text(x + 1, y, x, va="center")
  
          plt.yticks(ylocs, labels)
          plt.title("Feature importance (%)")
          plt.grid(True)
          plt.savefig(fig_name)
          plt.close()
  
          # Leak Detection
  
          leak = sorted(
              dict(tuples).items(), key=operator.itemgetter(1)
          )[-1]
          if (leak[-1] > 70) & (len(importance) > 1):
              warnings.warn(
                  "WARNING : " + str(leak[0]) + " is probably a leak ! "
                  "Please check and delete it..."
              )
  
      else:
          pass
  
imports: import pandas
  import numpy
  import os
  import pickle
  import warnings
  import time
  import operator
  import matplotlib
  import matplotlib.pyplot
  from sklearn.pipeline import Pipeline
  from ..encoding.na_encoder import NA_encoder
  from ..encoding.categorical_encoder import Categorical_encoder
  from ..model.classification.feature_selector import Clf_feature_selector
  from ..model.regression.feature_selector import Reg_feature_selector
  from ..model.classification.stacking_classifier import StackingClassifier
  from ..model.regression.stacking_regressor import StackingRegressor
  from ..model.classification.classifier import Classifier
  from ..model.regression.regressor import Regressor
label_desc: Use image node_id 4 for calling the Predictor obj's underlying member method code with example usage: obj.__save_feature_importances(importance, fig_name) without return types