code: def test_number_of_seasonal_components(
      data, periods, windows, expected
  ):
      mod = MSTL(endog=data, periods=periods, windows=windows)
      res = mod.fit()
      n_seasonal_components = (
          res.seasonal.shape[1]
          if res.seasonal.ndim > 1
          else res.seasonal.ndim
      )
      assert n_seasonal_components == expected
  
file_path: statsmodels/statsmodels/tsa/stl/tests/test_mstl.py
imports: from pathlib import Path
  from numpy.testing import assert_allclose, assert_equal
  import pandas
  import pytest
  from statsmodels.tsa.seasonal import MSTL
label_desc: Use image node_id 6 for calling a global function with example usage: test_number_of_seasonal_components(data, periods, windows, expected) without return types