code: def test_lag_fit_transform_columns(X, index_out, lag):
      """Test that columns of fit_transform output behave as expected."""
      t = Lag(lags=lag, index_out=index_out)
      Xt = t.fit_transform(X)
  
      if isinstance(lag, list):
          len_lag = len(lag)
      else:
          len_lag = 1
  
      def ncols(obj):
          if isinstance(obj, pd.DataFrame):
              return len(obj.columns)
          else:
              return 1
  
      assert ncols(Xt) == ncols(X) * len_lag
  
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 3 for calling a global function with example usage: test_lag_fit_transform_columns(X, index_out, lag) and returns: len, int