code: def test_columnselect_indextreatment(index_treatment):
      """Test that index_treatment behaviour in ColumnSelect works as intended."""
      X = load_longley()[1]
      columns = ["GNPDEFL", "POP", "FOO"]
      transformer = ColumnSelect(
          columns=columns, index_treatment=index_treatment
      )
      X_subset = transformer.fit_transform(X=X)
  
      columns_idx = pd.Index(columns)
      in_cols = columns_idx.isin(X.columns)
      col_X_and_cols = columns_idx[in_cols]
  
      if index_treatment == "remove":
          assert X_subset.columns.equals(col_X_and_cols)
      elif index_treatment == "keep":
          assert X_subset.columns.equals(columns_idx)
  
file_path: sktime/sktime/transformations/series/tests/test_subset.py
imports: import pandas
  import pytest
  from sktime.datasets import load_airline, load_longley
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.transformations.series.subset import ColumnSelect, IndexSubset
label_desc: Use image node_id 2 for calling a global function with example usage: test_columnselect_indextreatment(index_treatment) without return types