code: def test_oob_sarimax():
      xreg = rs.rand(wineind.shape[0], 2)
      fit = ARIMA(
          order=(1, 1, 1),
          seasonal_order=(0, 1, 1, 12),
          maxiter=5,
          out_of_sample_size=15,
      ).fit(y=wineind, X=xreg)
  
      fit_no_oob = ARIMA(
          order=(1, 1, 1),
          seasonal_order=(0, 1, 1, 12),
          out_of_sample_size=0,
          maxiter=5,
          suppress_warnings=True,
      ).fit(y=wineind[:-15], X=xreg[:-15, :])
  
      # now assert some of the same things here that we did in the former test
      oob = fit.oob()
  
      # compare scores:
      scoring = val.get_scoring_metric(fit_no_oob.scoring)
      no_oob_preds = fit_no_oob.predict(n_periods=15, X=xreg[-15:, :])
      assert np.allclose(
          oob, scoring(wineind[-15:], no_oob_preds), rtol=1e-2
      )
  
      # show params are no longer the same
      assert not np.allclose(
          fit.params(), fit_no_oob.params(), rtol=1e-2
      )
  
      # show we can add the new samples and get the exact same forecasts
      xreg_test = rs.rand(5, 2)
      fit_no_oob.update(wineind[-15:], xreg[-15:, :])
      assert np.allclose(
          fit.predict(5, xreg_test),
          fit_no_oob.predict(5, xreg_test),
          rtol=1e-2,
      )
  
      # And also the params should be close now after updating
      assert np.allclose(fit.params(), fit_no_oob.params())
  
      # Show we can get a confidence interval out here
      preds, conf = fit.predict(5, xreg_test, return_conf_int=True)
      assert all(isinstance(a, np.ndarray) for a in (preds, conf))
  
imports: import numpy
  import pandas
  from pmdarima.arima import ARIMA, auto_arima, AutoARIMA, ARMAtoMA
  from pmdarima.arima import _validation
  from pmdarima.compat.pytest import pytest_error_str
  from pmdarima.datasets import load_lynx, load_wineind, load_heartrate
  from numpy.random import RandomState
  from numpy.testing import assert_array_almost_equal, assert_almost_equal, assert_allclose
  from statsmodels import api
  from sklearn.metrics import mean_squared_error
  import datetime
  import joblib
  import os
  import pickle
  import pytest
  import tempfile
  import time
label_desc: Use image node_id 11 for calling a global function with example usage: test_oob_sarimax() without return types