code: def test_output_of_transformer():
      """Test correct output of SlidingWindowSegmenter."""
      X = _make_nested_from_array(
          np.array([1, 2, 3, 4, 5, 6]), n_instances=1, n_columns=1
      )
  
      st = SlidingWindowSegmenter(window_length=1).fit(X)
      res = st.transform(X)
      orig = convert_list_to_dataframe(
          [[1.0], [2.0], [3.0], [4.0], [5.0], [6.0]]
      )
      assert check_if_dataframes_are_equal(res, orig)
  
      st = SlidingWindowSegmenter(window_length=5).fit(X)
      res = st.transform(X)
      orig = convert_list_to_dataframe(
          [
              [1.0, 1.0, 1.0, 2.0, 3.0],
              [1.0, 1.0, 2.0, 3.0, 4.0],
              [1.0, 2.0, 3.0, 4.0, 5.0],
              [2.0, 3.0, 4.0, 5.0, 6.0],
              [3.0, 4.0, 5.0, 6.0, 6.0],
              [4.0, 5.0, 6.0, 6.0, 6.0],
          ]
      )
  
      assert check_if_dataframes_are_equal(res, orig)
  
      st = SlidingWindowSegmenter(window_length=10).fit(X)
      res = st.transform(X)
      orig = convert_list_to_dataframe(
          [
              [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 3.0, 4.0, 5.0],
              [1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0],
              [1.0, 1.0, 1.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 6.0],
              [1.0, 1.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 6.0, 6.0],
              [1.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 6.0, 6.0, 6.0],
              [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 6.0, 6.0, 6.0, 6.0],
          ]
      )
      assert check_if_dataframes_are_equal(res, orig)
  
file_path: sktime/sktime/transformations/panel/tests/test_sliding_window_segmenter_transformer.py
imports: import numpy
  import pandas
  import pytest
  from sktime.transformations.panel.segment import SlidingWindowSegmenter
  from sktime.utils._testing.panel import _make_nested_from_array
label_desc: Use image node_id 2 for calling a global function with example usage: test_output_of_transformer() without return types