code: def test_exog_to_direct_TypeError_when_exog_not_numpy_ndarray():
      """
      Test TypeError is raised when exog is not a numpy ndarray.
      """
      exog = pd.Series(np.arange(7))
  
      err_msg = re.escape(
          f"`exog` must be a numpy ndarray. Got {type(exog)}."
      )
      with pytest.raises(TypeError, match=err_msg):
          exog_to_direct_numpy(exog=exog, steps=2)
  
file_path: skforecast/skforecast/utils/tests/test_exog_to_direct_numpy.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.utils import exog_to_direct_numpy
label_desc: Use image node_id 1 for calling a global function with example usage: test_exog_to_direct_TypeError_when_exog_not_numpy_ndarray() without return types