code: def test_shift():
      """[Preprocessing | Shift] test lagging."""
      sh = Shift(2)
  
      sh.fit(X)
  
      Z = sh.transform(X)
  
      assert Z.shape[0] + 2 == X.shape[0]
      np.testing.assert_array_equal(Z, X[:-2])
  
imports: import numpy
  from mlens.preprocessing import Subset, Shift
  from mlens.testing.dummy import Data
label_desc: Use image node_id 3 for calling a global function with example usage: test_shift() without return types