code: def test_adf_ols():
      # Test the _ols function of the ADF test
      x = np.array([1, -1, 0, 2, -1, -2, 3])
      k = 2
      y = diff(x)
      assert_array_equal(y, [-2, 1, 2, -3, -1, 5])
  
      z = ADFTest._embed(y, k).T
      res = ADFTest._ols(x, y, z, k)
  
      # Assert on the params of the OLS. The comparisons are those obtained
      # from the R function.
      expected = np.array([1.0522, -3.1825, -0.1609, 1.4690])
      assert np.allclose(res.params, expected, rtol=0.001)
  
      # Now assert on the standard error
      stat = ADFTest._ols_std_error(res)
      assert np.allclose(stat, -100.2895)
  
file_path: pmdarima/pmdarima/arima/tests/test_stationarity.py
imports: from pmdarima.arima.stationarity import ADFTest, PPTest, KPSSTest
  from pmdarima.arima.utils import ndiffs
  from pmdarima.utils.array import diff
  from pmdarima.datasets import load_austres
  from sklearn.utils import check_random_state
  from numpy.testing import assert_array_almost_equal, assert_almost_equal, assert_array_equal
  import numpy
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_adf_ols() without return types