code: def test__plot_feature_importance_detailed(
      sort, top_k, features, targets, exp_importance
  ):
      """Tests if the `_plot_feature_importance` returns the correct plots when ``summarise='False'``."""
      axes = _plot_feature_importance(
          exp=exp_importance,
          features=features,
          targets=targets,
          summarise=False,
          sort=sort,
          top_k=top_k,
      ).ravel()
  
      expected_importance = np.array(
          [
              exp_importance.data["feature_importance"][targets[0]][ft]
              for ft in features
          ]
      )
      if sort:
          sorted_idx = np.argsort(expected_importance)[::-1]
          expected_importance = expected_importance[sorted_idx][:top_k]
  
      importance = np.array(
          [
              extract_number(ax.get_title())
              for ax in axes
              if ax is not None
          ]
      )
      assert np.allclose(importance, expected_importance, atol=1e-2)
  
imports: import re
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  from pytest_lazyfixture import lazy_fixture
  from sklearn.ensemble import GradientBoostingRegressor
  from sklearn.linear_model import LinearRegression
  from alibi.api.defaults import DEFAULT_DATA_PDVARIANCE, DEFAULT_META_PDVARIANCE
  from alibi.api.interfaces import Explanation
  from alibi.explainers import PartialDependence, PartialDependenceVariance, TreePartialDependence
  from alibi.explainers.pd_variance import _plot_feature_importance, _plot_feature_interaction, _plot_hbar, plot_pd_variance
label_desc: Use image node_id 21 for calling a global function with example usage: test__plot_feature_importance_detailed(sort, top_k, features, targets, exp_importance) without return types