code: def test_ts_windowtransf_output_series(self):
      # univariate deterministic input
      transforms = {"function": "sum", "mode": "rolling", "window": 1}
      transformed_ts = self.series_univ_det.window_transform(
          transforms=transforms
      )
  
      assert list(
          itertools.chain(*transformed_ts.values().tolist())
      ) == list(
          itertools.chain(*self.series_univ_det.values().tolist())
      )
      assert transformed_ts.components.to_list() == [
          f"{transforms['mode']}_{transforms['function']}_{str(transforms['window'])}_{comp}"
          for comp in self.series_univ_det.components
      ]
  
      # test customized function name that overwrites the pandas builtin transformation
      transforms = {
          "function": "sum",
          "mode": "rolling",
          "window": 1,
          "function_name": "customized_name",
      }
      transformed_ts = self.series_univ_det.window_transform(
          transforms=transforms
      )
      assert transformed_ts.components.to_list() == [
          f"{transforms['mode']}_{transforms['function_name']}_{str(transforms['window'])}_{comp}"
          for comp in self.series_univ_det.components
      ]
      del transforms["function_name"]
  
      # multivariate deterministic input
      # transform one component
      transforms.update({"components": "0"})
  
      transformed_ts = self.series_multi_det.window_transform(
          transforms=transforms
      )
      assert transformed_ts.components.to_list() == [
          f"{transforms['mode']}_{transforms['function']}_{str(transforms['window'])}_{comp}"
          for comp in transforms["components"]
      ]
  
      transformed_ts = self.series_multi_det.window_transform(
          transforms=transforms, keep_non_transformed=True
      )
  
      assert (
          transformed_ts.components.to_list()
          == [
              f"{transforms['mode']}_{transforms['function']}_{str(transforms['window'])}_{comp}"
              for comp in transforms["components"]
          ]
          + self.series_multi_det.components.to_list()
      )
  
      # transform multiple components
      transforms = {
          "function": "sum",
          "mode": "rolling",
          "window": 1,
          "components": ["0", "0_1"],
      }
  
      transformed_ts = self.series_multi_det.window_transform(
          transforms=transforms
      )
      assert transformed_ts.components.to_list() == [
          f"{transforms['mode']}_{transforms['function']}_{str(transforms['window'])}_{comp}"
          for comp in transforms["components"]
      ]
  
      transformed_ts = self.series_multi_det.window_transform(
          transforms=transforms, keep_non_transformed=True
      )
  
      assert (
          transformed_ts.components.to_list()
          == [
              f"{transforms['mode']}_{transforms['function']}_{str(transforms['window'])}_{comp}"
              for comp in transforms["components"]
          ]
          + self.series_multi_det.components.to_list()
      )
  
      # multiple transformations
  
      transforms = [transforms] + [
          {
              "function": "mean",
              "mode": "rolling",
              "window": 1,
              "components": ["0", "0_1"],
          }
      ]
  
      transformed_ts = self.series_multi_det.window_transform(
          transforms=transforms
      )
      assert transformed_ts.components.to_list() == [
          f"{transformation['mode']}_{transformation['function']}_{str(transformation['window'])}_{comp}"
          for transformation in transforms
          for comp in transformation["components"]
      ]
  
      transformed_ts = self.series_multi_det.window_transform(
          transforms=transforms, keep_non_transformed=True
      )
      assert (
          transformed_ts.components.to_list()
          == [
              f"{transformation['mode']}_{transformation['function']}_{str(transformation['window'])}_{comp}"
              for transformation in transforms
              for comp in transformation["components"]
          ]
          + self.series_multi_det.components.to_list()
      )
  
      # multivariate probabilistic input
      transformed_ts = self.series_multi_prob.window_transform(
          transforms=transforms
      )
      assert transformed_ts.n_samples == 2
  
file_path: darts/darts/tests/dataprocessing/transformers/test_window_transformations.py
imports: import itertools
  import numpy
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.dataprocessing.pipeline import Pipeline
  from darts.dataprocessing.transformers import Mapper, WindowTransformer
label_desc: Use image node_id 2 for calling the TestTimeSeriesWindowTransform obj's underlying member method code with example usage: obj.test_ts_windowtransf_output_series() without return types