code: def test_integration(key, data, dtype):
      """Full integration test: estimate, fit, forecast"""
      order, seasonal_order, intercept = extract_order(key)
      s = max(1, seasonal_order[3])
  
      (
          y_train,
          y_train_cudf,
          y_test,
          _,
          _,
          exog_past_cudf,
          exog_fut,
          exog_fut_cudf,
      ) = get_dataset(data, dtype)
  
      # Get fit reference model
      ref_fits = get_ref_fit(
          data, order, seasonal_order, intercept, dtype
      )
  
      # Create and fit cuML model
      cuml_model = arima.ARIMA(
          endog=y_train_cudf,
          exog=exog_past_cudf,
          order=order,
          seasonal_order=seasonal_order,
          fit_intercept=intercept,
          output_type="numpy",
      )
      cuml_model.fit()
  
      # Predict
      y_fc_cuml = cuml_model.forecast(data.n_test, exog=exog_fut)
      y_fc_ref = np.zeros((data.n_test, data.batch_size))
      for i in range(data.batch_size):
          y_fc_ref[:, i] = (
              ref_fits[i]
              .get_prediction(
                  data.n_train,
                  data.n_obs - 1,
                  exog=None
                  if data.n_exog == 0
                  else exog_fut[
                      exog_fut.columns[
                          data.n_exog * i : data.n_exog * (i + 1)
                      ]
                  ],
              )
              .predicted_mean
          )
  
      # Compare results: MASE must be better or within the tolerance margin
      mase_ref = mase(y_train, y_test, y_fc_ref, s)
      mase_cuml = mase(y_train, y_test, y_fc_cuml, s)
      assert mase_cuml < mase_ref * (1.0 + data.tolerance_integration)
  
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 6 for calling a global function with example usage: test_integration(key, data, dtype) without return types