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: Plots top 10 feature importances
  
  Parameters
  ----------
  importance : dict
      Dictionary with features (key) and importances (values)
  
  top : int
      Number of top features to display.
  
  Returns
  -------
  NoneType
      None
docstr_tok: ["Plots","top","10","feature","importances","Parameters","--","--","--","--","--","importance",":","dict","Dictionary","with","features","(","key",")","and","importances","(","values",")","top",":","int","Number","of","top","features","to","display",".","Returns","--","--","--","-","NoneType","None"]
code: def __plot_feature_importances(self, importance, top=10):
      """Plots top 10 feature importances
  
      Parameters
      ----------
      importance : dict
          Dictionary with features (key) and importances (values)
  
      top : int
          Number of top features to display.
  
      Returns
      -------
      NoneType
          None
      """
  
      if len(importance) > 0:
          # Plot 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])[-top:]
          labels, values = zip(*tuples)
          plt.figure(figsize=(20, top * 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("Top " + str(top) + " feature importance (%)")
          plt.grid(True)
          plt.show()
          plt.close()
  
      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 5 for calling the Predictor obj's underlying member method code with example usage: obj.__plot_feature_importances(importance, top) without return types