def build_model(config: dict):
    """
    Build an Sktime model using the given config.

    It supports defaults for windowing the following parameters:
    - lag: list(range(1, 72 + 1))
    - mean: [[1, 24], [1, 48], [1, 72]]
    - std: [[1, 24], [1, 48], [1, 72]]
    """

    lag = config.pop(
        "forecaster_transformers__window_summarizer__lag_feature__lag",
        list(range(1, 72 + 1)),
    )
    mean = config.pop(
        "forecaster_transformers__window_summarizer__lag_feature__mean",
        [[1, 24], [1, 48], [1, 72]],
    )
    std = config.pop(
        "forecaster_transformers__window_summarizer__lag_feature__std",
        [[1, 24], [1, 48], [1, 72]],
    )
    n_jobs = config.pop("forecaster_transformers__window_summarizer__n_jobs", 1)
    window_summarizer = WindowSummarizer(
        **{"lag_feature": {"lag": lag, "mean": mean, "std": std}},
        n_jobs=n_jobs,
    )

    regressor = lgb.LGBMRegressor()
    forecaster = make_reduction(
        regressor,
        transformers=[window_summarizer],
        strategy="recursive",
        pooling="global",
        window_length=None,
    )

    pipe = ForecastingPipeline(
        steps=[
            ("attach_area_and_consumer_type", transformers.AttachAreaConsumerType()),
            (
                "daily_season",
                DateTimeFeatures(
                    manual_selection=["day_of_week", "hour_of_day"],
                    keep_original_columns=True,
                ),
            ),
            ("forecaster", forecaster),
        ]
    )
    pipe = pipe.set_params(**config)

    return pipe

    Build an Sktime model using the given config.

    It supports defaults for windowing the following parameters:
    - lag: list(range(1, 72 + 1))
    - mean: [[1, 24], [1, 48], [1, 72]]
    - std: [[1, 24], [1, 48], [1, 72]]
    
training-pipeline/training_pipeline/models.py