code: def test_check_y_exception_when_y_not_pandas_series(y):
      """
      Check exception is raised when y is not a pandas Series.
      """
      err_msg = re.escape("`y` must be a pandas Series.")
      with pytest.raises(TypeError, match=err_msg):
          check_y(y=y)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.utils import check_y
label_desc: Use image node_id 1 for calling a global function with example usage: test_check_y_exception_when_y_not_pandas_series(y) without return types