code: def test_summary_transformer_incorrect_summary_function_raises_error(
      summary_arg,
  ):
      """Test if correct errors are raised for invalid summary_function input."""
      msg = rf"""`summary_function` must be None, or str or a list or tuple made up of
            {ALLOWED_SUM_FUNCS}.
            """
      with pytest.raises(ValueError, match=re.escape(msg)):
          transformer = SummaryTransformer(
              summary_function=summary_arg, quantiles=None
          )
          transformer.fit_transform(data_to_test[0])
  
file_path: sktime/sktime/transformations/series/tests/test_summarize.py
imports: import re
  import numpy
  import pandas
  import pytest
  from sktime.transformations.series.summarize import ALLOWED_SUM_FUNCS, SummaryTransformer
  from sktime.utils._testing.series import _make_series
label_desc: Use image node_id 2 for calling a global function with example usage: test_summary_transformer_incorrect_summary_function_raises_error(summary_arg) without return types