code: def test_init_metrics_list():
      """Test if the metrics initialization raises an error when the metrics are provided through a list but the
      elements within the list are not strings."""
      with pytest.raises(ValueError) as err:
          PermutationImportance(
              predictor=lambda x: x, loss_fns=[lambda x: x]
          )
  
      assert re.search(
          "The .+ inside .+_fns must be of type `str`.", 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 3 for calling a global function with example usage: test_init_metrics_list() without return types