code: def test_plot_ale_targets(targets, explanation, mocker):
      """Test if `plot_ale` plots all the given targets."""
      m = mocker.patch("alibi.explainers.ale._plot_one_ale_num")
      plot_ale(exp=explanation, targets=targets).ravel()
  
      _, kwargs = m.call_args
      call_targets = kwargs["targets"]
  
      if targets == "all":
          expected_targets = list(
              range(len(explanation.data["target_names"]))
          )
      else:
          expected_targets = [
              int(re.findall(r"\d+", t)[0]) if isinstance(t, str) else t
              for t in targets
          ]
  
      assert np.allclose(call_targets, expected_targets)
  
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 14 for calling a global function with example usage: test_plot_ale_targets(targets, explanation, mocker) without return types