code: def _embed(x, k):
      # lag the vector and put the lags into columns
      n = x.shape[0]
      if k > n:
          raise ValueError("k cannot exceed y dim")
  
      rows = [
          # so, if k=2, it'll be (x[1:n], x[:n-1])
          x[j : n - i]
          for i, j in enumerate(range(k - 1, -1, -1))
      ]
      return np.asarray(rows)
  
imports: from sklearn.base import BaseEstimator
  from sklearn.linear_model import LinearRegression
  from statsmodels import api
  from abc import ABCMeta, abstractmethod
  import numpy
  from ..compat.numpy import DTYPE
  from ..decorators import deprecated
  from ..utils.array import c, diff, check_endog
  from .approx import approx
  from ._arima import C_tseries_pp_sum
label_desc: Use image node_id 2 for calling the _BaseStationarityTest obj's underlying member method code with example usage: obj._embed(x, k) and returns: np