code: def test_plot_ale_features(feats, explanation, mocker):
      """Test if `plot_ale` returns the expected number of plots given by the number of features."""
      m = mocker.patch("alibi.explainers.ale._plot_one_ale_num")
      axes = plot_ale(exp=explanation, features=feats).ravel()
  
      if feats == "all":
          expected_features = list(
              range(len(explanation.data["feature_names"]))
          )
      else:
          expected_features = [
              int(re.findall(r"\d+", f)[0]) if isinstance(f, str) else f
              for f in feats
          ]
  
      call_features = [
          kwargs["feature"] for _, kwargs in m.call_args_list
      ]
      assert np.allclose(call_features, expected_features)
      assert len(axes) == len(expected_features)
  
imports: import re
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from pytest_lazyfixture import lazy_fixture
  from alibi.api.defaults import DEFAULT_DATA_ALE, DEFAULT_META_ALE
  from alibi.api.interfaces import Explanation
  from alibi.explainers.ale import _plot_one_ale_num, adaptive_grid, ale_num, get_quantiles, minimum_satisfied, plot_ale
label_desc: Use image node_id 12 for calling a global function with example usage: test_plot_ale_features(feats, explanation, mocker) without return types