def test_transformers_pipeline(self):
        """
        Test that the forecasting window transformer can be used in a pipeline

        """

        times1 = pd.date_range("20130101", "20130110")
        series_1 = TimeSeries.from_times_and_values(times1, np.array(range(1, 11)))

        expected_transformed_series = TimeSeries.from_times_and_values(
            times1,
            np.array([100, 15, 30, 45, 60, 75, 90, 105, 120, 135]),
            columns=["rolling_sum_3_2_0"],
        )

        # adds NaNs
        window_transformations = [
            {"function": "sum", "mode": "rolling", "window": 3, "min_periods": 2}
        ]

        def times_five(x):
            return x * 5

        mapper = Mapper(fn=times_five)

        window_transformer = WindowTransformer(
            transforms=window_transformations, treat_na=100
        )

        pipeline = Pipeline([mapper, window_transformer])

        transformed_series = pipeline.fit_transform(series_1)

        assert transformed_series == expected_transformed_series

        Test that the forecasting window transformer can be used in a pipeline

        
darts/tests/dataprocessing/transformers/test_window_transformations.py