code: def test_fe_exog_data_no_exo(load_pos_and_neg_data):
      """Test custom feature engineering for target and exogenous when data does
      not have any exogenous variables. e.g. extracting DateTimeFeatures from Index.
      """
      data = load_pos_and_neg_data
      kwargs = {
          "lag_feature": {
              "lag": [12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
          }
      }
      fe_target_rr = [
          WindowSummarizer(n_jobs=1, truncate="bfill", **kwargs)
      ]
  
      # Baseline
      exp = TSForecastingExperiment()
      exp.setup(data=data, fh=12, session_id=42)
      _ = exp.create_model("lr_cds_dt")
      metrics1 = exp.pull()
  
      # With Feature Engineering (1) - replicate the default
      exp = TSForecastingExperiment()
      exp.setup(
          data=data, fh=12, fe_target_rr=fe_target_rr, session_id=42
      )
      _ = exp.create_model("lr_cds_dt")
      metrics2 = exp.pull()
      assert_frame_equal(metrics1, metrics2)
  
      # With Feature Engineering (2) - Date Time features created in y
      fe_target2 = fe_target_rr + [DateTimeFeatures(ts_freq="M")]
      exp = TSForecastingExperiment()
      exp.setup(
          data=data, fh=12, fe_target_rr=fe_target2, session_id=42
      )
      _ = exp.create_model("lr_cds_dt")
      metrics3 = exp.pull()
      assert_frame_not_equal(metrics1, metrics3)
  
      # With Feature Engineering (3) - Date Time features created in X
      fe_exogenous = [DateTimeFeatures(ts_freq="M")]
      exp = TSForecastingExperiment()
      exp.setup(
          data=data,
          fh=12,
          fe_target_rr=fe_target_rr,
          fe_exogenous=fe_exogenous,
          session_id=42,
      )
      _ = exp.create_model("lr_cds_dt")
      metrics4 = exp.pull()
      assert_frame_not_equal(metrics1, metrics4)
  
file_path: pycaret/tests/test_time_series_feat_eng.py
imports: import numpy
  import pytest
  from pandas.testing import assert_frame_equal
  from sktime.transformations.series.date import DateTimeFeatures
  from sktime.transformations.series.summarize import WindowSummarizer
  from time_series_test_utils import assert_frame_not_equal
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 3 for calling a global function with example usage: test_fe_exog_data_no_exo(load_pos_and_neg_data) without return types