code: def test_with_oob_and_X(as_pd, scoring):
      endog = hr
      X = np.random.RandomState(1).rand(hr.shape[0], 3)
      if as_pd:
          X = pd.DataFrame.from_records(X)
          endog = pd.Series(hr)
  
      arima = ARIMA(
          order=(2, 1, 2),
          suppress_warnings=True,
          scoring=scoring,
          out_of_sample_size=10,
      ).fit(y=endog, X=X)
  
      # show we can get oob score and preds
      arima.oob()
  
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 8 for calling a global function with example usage: test_with_oob_and_X(as_pd, scoring) without return types