code: def test_include_current(self):
      # if "closed"="left" should not shift the index
      transformation = {
          "function": "sum",
          "mode": "rolling",
          "window": 1,
          "closed": "left",
      }
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times,
          np.array(["NaN", 1, 2, 3, 4, 5, 6, 7, 8, 9]),
          columns=["rolling_sum_1_0"],
      )
      transformed_ts = self.target.window_transform(
          transformation, include_current=False
      )
      assert transformed_ts == expected_transformed_series
  
      # shift the index
      transformation = {
          "function": "sum",
          "mode": "rolling",
          "window": 1,
      }
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times,
          np.array(["NaN", 1, 2, 3, 4, 5, 6, 7, 8, 9]),
          columns=["rolling_sum_1_0"],
      )
      transformed_ts = self.target.window_transform(
          transformation, include_current=False
      )
      assert transformed_ts == expected_transformed_series
  
      transformation = [
          {
              "function": "sum",
              "mode": "rolling",
              "window": 1,
              "closed": "left",
          },
          {"function": "sum", "mode": "ewm", "span": 1},
      ]
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times,
          np.array(
              [
                  ["NaN", "NaN"],
                  [1, 1],
                  [2, 2],
                  [3, 3],
                  [4, 4],
                  [5, 5],
                  [6, 6],
                  [7, 7],
                  [8, 8],
                  [9, 9],
              ]
          ),
          columns=["rolling_sum_1_0", "ewm_sum_0"],
      )
      transformed_ts = self.target.window_transform(
          transformation, include_current=False
      )
      assert transformed_ts == expected_transformed_series
  
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times,
          np.array(
              [
                  [1, 1],
                  [1, 1],
                  [2, 2],
                  [3, 3],
                  [4, 4],
                  [5, 5],
                  [6, 6],
                  [7, 7],
                  [8, 8],
                  [9, 9],
              ]
          ),
          columns=["rolling_sum_1_0", "ewm_sum_0"],
      )
      transformed_ts = self.target.window_transform(
          transformation,
          include_current=False,
          forecasting_safe=False,
          treat_na="bfill",
      )
      assert transformed_ts == expected_transformed_series
  
      transformation = [
          {
              "function": "sum",
              "mode": "rolling",
              "window": 2,
              "closed": "left",
              "min_periods": 2,
          },
          {
              "function": "sum",
              "mode": "ewm",
              "span": 1,
              "min_periods": 2,
          },
      ]
  
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times,
          np.array(
              [
                  ["NaN", "NaN"],
                  ["NaN", "NaN"],
                  [3, 2],
                  [5, 3],
                  [7, 4],
                  [9, 5],
                  [11, 6],
                  [13, 7],
                  [15, 8],
                  [17, 9],
              ]
          ),
          columns=["rolling_sum_2_2_0", "ewm_sum_2_0"],
      )
  
      transformed_ts = self.target.window_transform(
          transformation, include_current=False
      )
      assert transformed_ts == expected_transformed_series
  
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 6 for calling the TestTimeSeriesWindowTransform obj's underlying member method code with example usage: obj.test_include_current() without return types