code: def test_VECM_seasonal_forecast():
      # timing of seasonal dummies, VAR forecast horizon
      np.random.seed(964255)
      nobs = 200
      seasons = 6
      fact = np.cumsum(0.1 + np.random.randn(nobs, 2), 0)
  
      xx = np.random.randn(nobs + 2, 3)
      xx = xx[2:] + 0.6 * xx[1:-1] + 0.25 * xx[:-2]
      xx[:, :2] += fact[:, 0][:, None]
      xx[:, 2:] += fact[:, 1][:, None]
      # add large seasonal effect
      xx += 3 * np.log(0.1 + (np.arange(nobs)[:, None] % seasons))
  
      res0 = VECM(
          xx,
          k_ar_diff=0,
          coint_rank=2,
          deterministic="co",
          seasons=seasons,
          first_season=0,
      ).fit()
      res2 = VECM(
          xx,
          k_ar_diff=2,
          coint_rank=2,
          deterministic="co",
          seasons=seasons,
          first_season=0,
      ).fit()
      res4 = VECM(
          xx,
          k_ar_diff=4,
          coint_rank=2,
          deterministic="co",
          seasons=seasons,
          first_season=0,
      ).fit()
  
      # check that seasonal dummy are independent of number of lags
      assert_allclose(
          res2._delta_x.T[-2 * seasons :, -seasons:],
          res0._delta_x.T[-2 * seasons :, -seasons:],
          rtol=1e-10,
      )
      assert_allclose(
          res4._delta_x.T[-2 * seasons :, -seasons:],
          res0._delta_x.T[-2 * seasons :, -seasons:],
          rtol=1e-10,
      )
  
      # check location of smallest seasonal coefficient
      assert_array_equal(np.argmin(res0.det_coef, axis=1), [1, 1, 1])
      assert_array_equal(np.argmin(res2.det_coef, axis=1), [1, 1, 1])
      assert_array_equal(np.argmin(res4.det_coef, axis=1), [1, 1, 1])
  
      # predict 3 cycles, check location of dips
      dips_true = np.array([[4, 4, 4], [10, 10, 10], [16, 16, 16]])
      for res in [res0, res2, res4]:
          forecast = res.predict(steps=3 * seasons)
          dips = np.sort(np.argsort(forecast, axis=0)[:3], axis=0)
          assert_array_equal(dips, dips_true)
  
imports: import numpy
  from numpy.testing import assert_, assert_allclose, assert_array_equal, assert_raises, assert_raises_regex
  import pytest
  import statsmodels.datasets.interest_inflation.data
  from statsmodels.tools.testing import assert_equal
  from statsmodels.tsa.vector_ar.tests.JMulTi_results.parse_jmulti_vecm_output import dt_s_tup_to_string, load_results_jmulti, sublists
  from statsmodels.tsa.vector_ar.util import seasonal_dummies
  from statsmodels.tsa.vector_ar.var_model import VARProcess
  from statsmodels.tsa.vector_ar.vecm import VECM, select_coint_rank, select_order
label_desc: Use image node_id 26 for calling a global function with example usage: test_VECM_seasonal_forecast() without return types