code: def get_ref_fit(data, order, seasonal_order, intercept, dtype):
      """Compute a reference fit of a dataset with the given parameters and dtype
      or return a previously computed fit
      """
      y_train, _, _, _, exog_past, *_ = get_dataset(data, dtype)
      key = (
          order
          + seasonal_order
          + (intercept, data.dataset, np.dtype(dtype).name)
      )
      batch_size = y_train.shape[1]
      if key not in lazy_ref_fit:
          ref_model = [
              sm.tsa.SARIMAX(
                  endog=y_train[y_train.columns[i]],
                  exog=exog_past[
                      exog_past.columns[
                          data.n_exog * i : data.n_exog * (i + 1)
                      ]
                  ]
                  if exog_past is not None
                  else None,
                  order=order,
                  seasonal_order=seasonal_order,
                  trend="c" if intercept else "n",
              )
              for i in range(batch_size)
          ]
          with warnings.catch_warnings():
              warnings.filterwarnings("ignore")
              lazy_ref_fit[key] = [
                  model.fit(disp=0) for model in ref_model
              ]
      return lazy_ref_fit[key]
  
imports: from cuml.testing.utils import stress_param
  from cuml.internals.input_utils import input_to_host_array
  import cuml.tsa.arima
  from cuml.internals.safe_imports import gpu_only_import
  import statsmodels.api
  from sklearn.model_selection import train_test_split
  from cuml.internals.safe_imports import cpu_only_import_from
  import warnings
  import os
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: get_ref_fit(data, order, seasonal_order, intercept, dtype) and returns: lazy_ref_fit