docstr: Test that the forecasting window transformer dictionary input parameter is correctly formatted
docstr_tok: ["Test","that","the","forecasting","window","transformer","dictionary","input","parameter","is","correctly","formatted"]
code: def test_ts_windowtransf_input_dictionary(self):
      """
      Test that the forecasting window transformer dictionary input parameter is correctly formatted
      """
  
      with pytest.raises(TypeError):
          window_transformations = None  # None input
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = []  # empty list
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(KeyError):
          window_transformations = {}  # empty dictionary
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = [1, 2, 3]  # list of not dictionaries
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(KeyError):
          window_transformations = {
              "random_fn_name": "mean"
          }  # no 'function' key
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(AttributeError):
          window_transformations = {
              "function": "wild_fn"
          }  # not valid pandas built-in function
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": 1
          }  # not valid pandas built-in function nore callable
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": None
          }  # None function value
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(TypeError):
          window_transformations = {
              "function": "quantile",
              "window": [3],
          }  # not enough mandatory arguments for quantile
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": "mean",
              "mode": "rolling",
              "window": -3,
          }  # negative window
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": "mean",
              "mode": "rolling",
              "window": None,
          }  # None window
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": "mean",
              "mode": "rolling",
              "window": [5],
          }  # window list
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": "mean",
              "window": 3,
              "mode": "rolling",
              "step": -2,
          }  # Negative step
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": "mean",
              "window": 3,
              "mode": "rnd",
          }  # invalid mode
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
      with pytest.raises(ValueError):
          window_transformations = {
              "function": "mean",
              "mode": "rolling",
              "window": 3,
              "center": "True",
          }  # forecating_safe=True vs center=True
          self.series_univ_det.window_transform(
              transforms=window_transformations
          )
  
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 1 for calling the TestTimeSeriesWindowTransform obj's underlying member method code with example usage: obj.test_ts_windowtransf_input_dictionary() without return types