code: def test_sort_index(df_time):
      # Shuffle dataframe
      Xs = df_time.sample(frac=1)
  
      transformer = ExpandingWindowFeatures(sort_index=False)
      df_tr = transformer.fit_transform(Xs)
      assert_frame_equal(
          df_tr[transformer.variables_], Xs[transformer.variables_]
      )
  
      transformer = ExpandingWindowFeatures(sort_index=True)
      df_tr = transformer.fit_transform(Xs)
      assert_frame_equal(
          df_tr[transformer.variables_],
          Xs[transformer.variables_].sort_index(),
      )
  
file_path: feature_engine/tests/test_time_series/test_forecasting/test_expanding_window_features.py
imports: import numpy
  import pytest
  from pandas.testing import assert_frame_equal
  from feature_engine.timeseries.forecasting import ExpandingWindowFeatures
label_desc: Use image node_id 14 for calling a global function with example usage: test_sort_index(df_time) without return types