code: def check_attributes(
      spec,
      order,
      seasonal_order,
      enforce_stationarity,
      enforce_invertibility,
      concentrate_scale,
  ):
      p, d, q = order
      P, D, Q, s = seasonal_order
  
      assert_equal(spec.order, (p, d, q))
      assert_equal(spec.seasonal_order, (P, D, Q, s))
  
      assert_equal(spec.ar_order, p)
      assert_equal(spec.diff, d)
      assert_equal(spec.ma_order, q)
  
      assert_equal(spec.seasonal_ar_order, P)
      assert_equal(spec.seasonal_diff, D)
      assert_equal(spec.seasonal_ma_order, Q)
      assert_equal(spec.seasonal_periods, s)
  
      assert_equal(
          spec.ar_lags,
          (p if isinstance(p, list) else np.arange(1, p + 1)),
      )
      assert_equal(
          spec.ma_lags,
          (q if isinstance(q, list) else np.arange(1, q + 1)),
      )
  
      assert_equal(
          spec.seasonal_ar_lags,
          (P if isinstance(P, list) else np.arange(1, P + 1)),
      )
      assert_equal(
          spec.seasonal_ma_lags,
          (Q if isinstance(Q, list) else np.arange(1, Q + 1)),
      )
  
      max_ar_order = p[-1] if isinstance(p, list) else p
      max_ma_order = q[-1] if isinstance(q, list) else q
      max_seasonal_ar_order = P[-1] if isinstance(P, list) else P
      max_seasonal_ma_order = Q[-1] if isinstance(Q, list) else Q
      assert_equal(spec.max_ar_order, max_ar_order)
      assert_equal(spec.max_ma_order, max_ma_order)
      assert_equal(spec.max_seasonal_ar_order, max_seasonal_ar_order)
      assert_equal(spec.max_seasonal_ma_order, max_seasonal_ma_order)
      assert_equal(
          spec.max_reduced_ar_order,
          max_ar_order + max_seasonal_ar_order * s,
      )
      assert_equal(
          spec.max_reduced_ma_order,
          max_ma_order + max_seasonal_ma_order * s,
      )
  
      assert_equal(spec.enforce_stationarity, enforce_stationarity)
      assert_equal(spec.enforce_invertibility, enforce_invertibility)
      assert_equal(spec.concentrate_scale, concentrate_scale)
  
file_path: statsmodels/statsmodels/tsa/arima/tests/test_specification.py
imports: import numpy
  import pandas
  import pytest
  from numpy.testing import assert_equal, assert_allclose, assert_raises
  from statsmodels.tsa.statespace.tools import constrain_stationary_univariate, unconstrain_stationary_univariate
  from statsmodels.tsa.arima import specification
label_desc: Use image node_id 1 for calling a global function with example usage: check_attributes(spec, order, seasonal_order, enforce_stationarity, enforce_invertibility, concentrate_scale) without return types