code: def test_single_window_when_using_periods(df_time):
      expected_results = {
          "ambient_temp": [
              31.31,
              31.51,
              32.15,
              32.39,
              32.62,
              32.5,
              32.52,
              32.68,
              33.76,
          ],
          "module_temp": [
              49.18,
              49.84,
              52.35,
              50.63,
              49.61,
              47.01,
              46.67,
              47.52,
              49.8,
          ],
          "irradiation": [
              0.51,
              0.79,
              0.65,
              0.76,
              0.42,
              0.49,
              0.57,
              0.56,
              0.74,
          ],
          "color": [
              "blue",
              "blue",
              "blue",
              "blue",
              "blue",
              "blue",
              "blue",
              "blue",
              "blue",
          ],
          "ambient_temp_window_3_median": [
              np.nan,
              np.nan,
              np.nan,
              np.nan,
              31.51,
              32.15,
              32.39,
              32.5,
              32.52,
          ],
          "module_temp_window_3_median": [
              np.nan,
              np.nan,
              np.nan,
              np.nan,
              49.84,
              50.63,
              50.63,
              49.61,
              47.01,
          ],
          "irradiation_window_3_median": [
              np.nan,
              np.nan,
              np.nan,
              np.nan,
              0.65,
              0.76,
              0.65,
              0.49,
              0.49,
          ],
      }
      expected_results_df = pd.DataFrame(
          data=expected_results, index=_date_time
      )
  
      # Case 1: automatically select variables
      transformer = WindowFeatures(
          window=3, functions=["median"], periods=2
      )
      df_tr = transformer.fit_transform(df_time)
  
      assert df_tr.head(9).equals(expected_results_df)
  
      # Case 2: when drop_original is true
      transformer = WindowFeatures(
          window=3, functions=["median"], periods=2, drop_original=True
      )
      df_tr = transformer.fit_transform(df_time)
  
      assert df_tr.head(9).equals(
          expected_results_df.drop(
              ["ambient_temp", "module_temp", "irradiation"], axis=1
          )
      )
  
      # Case 3: user indicates multiple variables
      transformer = WindowFeatures(
          variables=["module_temp", "irradiation"],
          window=3,
          functions="median",
          periods=2,
      )
      transformer.fit(df_time)
      df_tr = transformer.transform(df_time)
  
      assert df_tr.head(9).equals(
          expected_results_df.drop(
              ["ambient_temp_window_3_median"], axis=1
          )
      )
  
      # Case 4: user indicates 1 variable
      transformer = WindowFeatures(
          variables=["module_temp"],
          window=3,
          functions=["median"],
          periods=2,
      )
      transformer.fit(df_time)
      df_tr = transformer.transform(df_time)
  
      assert df_tr.head(9).equals(
          expected_results_df.drop(
              [
                  "ambient_temp_window_3_median",
                  "irradiation_window_3_median",
              ],
              axis=1,
          )
      )
  
file_path: feature_engine/tests/test_time_series/test_forecasting/test_window_features.py
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from feature_engine.timeseries.forecasting import WindowFeatures
label_desc: Use image node_id 7 for calling a global function with example usage: test_single_window_when_using_periods(df_time) without return types