code: def test_ts_windowtransf_output_nabehavior(self):
      window_transformations = {
          "function": "sum",
          "mode": "rolling",
          "window": 3,
          "min_periods": 2,
      }
  
      # fill na with a specific value
      transformed_ts = self.target.window_transform(
          window_transformations, treat_na=100
      )
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times,
          np.array([100, 3, 6, 9, 12, 15, 18, 21, 24, 27]),
          columns=["rolling_sum_3_2_0"],
      )
      assert transformed_ts == expected_transformed_series
  
      # dropna
      transformed_ts = self.target.window_transform(
          window_transformations, treat_na="dropna"
      )
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times[1:],
          np.array([3, 6, 9, 12, 15, 18, 21, 24, 27]),
          columns=["rolling_sum_3_2_0"],
      )
      assert transformed_ts == expected_transformed_series
  
      # backfill na
      transformed_ts = self.target.window_transform(
          window_transformations,
          treat_na="bfill",
          forecasting_safe=False,
      )
      # backfill works only with forecasting_safe=False
      expected_transformed_series = TimeSeries.from_times_and_values(
          self.times,
          np.array([3, 3, 6, 9, 12, 15, 18, 21, 24, 27]),
          columns=["rolling_sum_3_2_0"],
      )
      assert transformed_ts == expected_transformed_series
  
      with pytest.raises(ValueError):
          # uknonwn treat_na
          self.target.window_transform(
              window_transformations,
              treat_na="fillrnd",
              forecasting_safe=False,
          )
  
      with pytest.raises(ValueError):
          # unauhtorized treat_na=bfill with forecasting_safe=True
          self.target.window_transform(
              window_transformations, treat_na="bfill"
          )
  
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 4 for calling the TestTimeSeriesWindowTransform obj's underlying member method code with example usage: obj.test_ts_windowtransf_output_nabehavior() without return types