code: def test_ocsb_do_lag():
      q = np.arange(5)
  
      assert_array_equal(
          OCSBTest._do_lag(q, 1, False),
          [[0.0], [1.0], [2.0], [3.0], [4.0]],
      )
  
      assert_array_equal(
          OCSBTest._do_lag(q, 1, True),
          [[0.0], [1.0], [2.0], [3.0], [4.0]],
      )
  
      assert_array_equal(
          OCSBTest._do_lag(q, 2, False),
          [
              [0.0, np.nan],
              [1.0, 0.0],
              [2.0, 1.0],
              [3.0, 2.0],
              [4.0, 3.0],
              [np.nan, 4.0],
          ],
      )
  
      assert_array_equal(
          OCSBTest._do_lag(q, 2, True),
          [[1.0, 0.0], [2.0, 1.0], [3.0, 2.0], [4.0, 3.0]],
      )
  
      assert_array_equal(
          OCSBTest._do_lag(q, 3, False),
          [
              [0.0, np.nan, np.nan],
              [1.0, 0.0, np.nan],
              [2.0, 1.0, 0.0],
              [3.0, 2.0, 1.0],
              [4.0, 3.0, 2.0],
              [np.nan, 4.0, 3.0],
              [np.nan, np.nan, 4.0],
          ],
      )
  
      assert_array_equal(
          OCSBTest._do_lag(q, 3, True),
          [[2.0, 1.0, 0.0], [3.0, 2.0, 1.0], [4.0, 3.0, 2.0]],
      )
  
      assert_array_equal(
          OCSBTest._do_lag(q, 4, False),
          [
              [0.0, np.nan, np.nan, np.nan],
              [1.0, 0.0, np.nan, np.nan],
              [2.0, 1.0, 0.0, np.nan],
              [3.0, 2.0, 1.0, 0.0],
              [4.0, 3.0, 2.0, 1.0],
              [np.nan, 4.0, 3.0, 2.0],
              [np.nan, np.nan, 4.0, 3.0],
              [np.nan, np.nan, np.nan, 4.0],
          ],
      )
  
      assert_array_equal(
          OCSBTest._do_lag(q, 4, True),
          [[3.0, 2.0, 1.0, 0.0], [4.0, 3.0, 2.0, 1.0]],
      )
  
imports: from pmdarima.arima.seasonality import CHTest, decompose, OCSBTest
  from pmdarima.arima.utils import nsdiffs
  from pmdarima.compat.pytest import pytest_error_str
  from pmdarima.datasets import load_airpassengers, load_ausbeer, load_austres, load_wineind
  import numpy
  from numpy.testing import assert_almost_equal, assert_array_equal
  from sklearn.utils.validation import check_random_state
  import pytest
  from unittest import mock
label_desc: Use image node_id 9 for calling a global function with example usage: test_ocsb_do_lag() without return types