code: def test_lag_fit_transform_out_index(X, index_out):
      """Test that index sets of fit_transform output behave as expected."""
      t = Lag(2, index_out=index_out)
      Xt = t.fit_transform(X)
  
      if index_out == "original":
          assert Xt.index.equals(X.index)
      elif index_out == "extend":
          assert X.index.isin(Xt.index).all()
          assert len(Xt) == len(X) + 2
      elif index_out == "shift":
          assert len(Xt) == len(X)
          assert X.index[2:].isin(Xt.index).all()
          assert not X.index[:2].isin(Xt.index).any()
  
file_path: sktime/sktime/transformations/series/tests/test_lag.py
imports: import itertools
  import numpy
  import pandas
  import pytest
  from sktime.datatypes import get_examples
  from sktime.transformations.series.lag import Lag
  from sktime.utils._testing.series import _make_series
label_desc: Use image node_id 1 for calling a global function with example usage: test_lag_fit_transform_out_index(X, index_out) without return types