code: def test_embedding(cls):
      x = np.arange(5)
      expected = np.array([[1, 2, 3, 4], [0, 1, 2, 3]])
  
      assert_array_almost_equal(cls._embed(x, 2), expected)
  
      y = np.array([1, -1, 0, 2, -1, -2, 3])
      assert_array_almost_equal(
          cls._embed(y, 1), np.array([[1, -1, 0, 2, -1, -2, 3]])
      )
  
      assert_array_almost_equal(
          cls._embed(y, 2).T,
          np.array(
              [[-1, 1], [0, -1], [2, 0], [-1, 2], [-2, -1], [3, -2]]
          ),
      )
  
      assert_array_almost_equal(
          cls._embed(y, 3).T,
          np.array(
              [
                  [0, -1, 1],
                  [2, 0, -1],
                  [-1, 2, 0],
                  [-2, -1, 2],
                  [3, -2, -1],
              ]
          ),
      )
  
      # Where K close to y dim
      assert_array_almost_equal(
          cls._embed(y, 6).T,
          np.array([[-2, -1, 2, 0, -1, 1], [3, -2, -1, 2, 0, -1]]),
      )
  
      # Where k == y dim
      assert_array_almost_equal(
          cls._embed(y, 7).T, np.array([[3, -2, -1, 2, 0, -1, 1]])
      )
  
      # Assert we fail when k > dim
      with pytest.raises(ValueError):
          cls._embed(y, 8)
  
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 2 for calling a global function with example usage: test_embedding(cls) without return types