code: def test_plot_pi_ax(exp):
      """Test if an error is raised when the number of axes provided is less than the number
      of targets to be plotted."""
      num_metrics = len(exp.data["metric_names"]) - 1
      _, ax = plt.subplots(nrows=1, ncols=num_metrics)
  
      with pytest.raises(ValueError) as err:
          plot_permutation_importance(exp=exp, ax=ax)
      assert "Expected ax to have" in str(err.value)
  
imports: import re
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import pytest
  from pytest_lazyfixture import lazy_fixture
  from sklearn.metrics import accuracy_score, f1_score, max_error
  from alibi.api.defaults import DEFAULT_DATA_PERMUTATION_IMPORTANCE, DEFAULT_META_PERMUTATION_IMPORTANCE
  from alibi.api.interfaces import Explanation
  from alibi.explainers import PermutationImportance, plot_permutation_importance
label_desc: Use image node_id 24 for calling a global function with example usage: test_plot_pi_ax(exp) without return types