code: def test_windowsummarizer(
      kwargs, column_names, y, target_cols, truncate
  ):
      """Test columns match kwargs arguments."""
      if kwargs is not None:
          transformer = WindowSummarizer(
              **kwargs, target_cols=target_cols, truncate=truncate
          )
      else:
          transformer = WindowSummarizer(
              target_cols=target_cols, truncate=truncate
          )
      Xt = transformer.fit_transform(y)
      if Xt is not None:
          if isinstance(Xt, pd.DataFrame):
              Xt_columns = Xt.columns.to_list()
          else:
              Xt_columns = Xt.name
      else:
          Xt_columns = None
  
      # check that the index names are preserved
      assert y.index.names == Xt.index.names
  
      check_eval(Xt_columns, column_names)
  
file_path: sktime/sktime/transformations/series/tests/test_window_summarizer.py
imports: import numpy
  import pandas
  import pytest
  from sktime.datasets import load_airline, load_longley
  from sktime.datatypes import get_examples
  from sktime.split import temporal_train_test_split
  from sktime.tests.test_switch import run_test_for_class
  from sktime.transformations.series.summarize import WindowSummarizer
label_desc: Use image node_id 3 for calling a global function with example usage: test_windowsummarizer(kwargs, column_names, y, target_cols, truncate) without return types