code: def test_detect_weekly(time_col: str, value_col: str):
      # create input_df
      input_val_ls = [100] * 10 + [200] * 10 + [300] * 10
      input_ts_ls = pd.date_range(
          datetime(2020, 1, 1), freq="W", periods=30
      )
      input_df = pd.DataFrame(
          {time_col: input_ts_ls, value_col: input_val_ls}
      )
  
      # create expected_df
      expected_df = pd.DataFrame(
          {
              time_col: pd.date_range(
                  datetime(2020, 1, 1), freq="W", periods=35
              ),
              value_col: [100] * 10
              + [200] * 10
              + [300] * 10
              + [None] * 5,
              f"{LEVELSHIFT_COL_PREFIX_SHORT}_2020_03_15_00_00": [0]
              * 10
              + [1] * 25,
              f"{LEVELSHIFT_COL_PREFIX_SHORT}_2020_05_24_00_00": [0]
              * 20
              + [1] * 15,
          }
      )
  
      # call the function
      detector = ShiftDetection()
      output_regressor_col, output_df = detector.detect(
          input_df,
          time_col=time_col,
          value_col=value_col,
          forecast_horizon=5,
          freq="W",
          z_score_cutoff=3,
      )
  
      # unit test
      pd.testing.assert_frame_equal(output_df, expected_df)
      assert output_regressor_col == [
          f"{LEVELSHIFT_COL_PREFIX_SHORT}_2020_03_15_00_00",
          f"{LEVELSHIFT_COL_PREFIX_SHORT}_2020_05_24_00_00",
      ]
  
file_path: greykite/greykite/tests/algo/changepoint/shift_detection/test_shift_detector.py
imports: from datetime import datetime
  import pandas
  import pytest
  from greykite.algo.changepoint.shift_detection.shift_detector import ShiftDetection
  from greykite.common.constants import LEVELSHIFT_COL_PREFIX_SHORT
label_desc: Use image node_id 2 for calling a global function with example usage: test_detect_weekly(time_col, value_col) without return types