code: def test_lag_fit_transform_column_names(X, index_out, lags):
      """Test expected column names."""
      t = Lag(lags=lags, index_out=index_out)
      Xt = t.fit_transform(X)
  
      if isinstance(Xt, pd.DataFrame):
          lag_col_names = set(Xt.columns)
  
          if isinstance(X, pd.DataFrame):
              col_names = X.columns
          elif isinstance(X, pd.Series):
              col_names = [X.name if X.name else 0]
          else:
              pass
  
          lags = [lags] if isinstance(lags, int) else lags
          expected = {
              f"lag_{lag}__{col}"
              for lag, col in itertools.product(lags, col_names)
          }
          assert lag_col_names == expected
  
      elif isinstance(Xt, pd.Series):
          assert Xt.name is None
  
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 4 for calling a global function with example usage: test_lag_fit_transform_column_names(X, index_out, lags) without return types