class_docstr: Tests that data transformers inheriting from both `FittableDataTransformer` and
  `InvertibleDataTransformer` classes behave correctly when `global_fit` attribute
  is `False`.
class_docstr_tok: ["Tests","that","data","transformers","inheriting","from","both","`","FittableDataTransformer","`","and","`","InvertibleDataTransformer","`","classes","behave","correctly","when","`","global_fit","`","attribute","is","`","False","`","."]
docstr: Tests for correct transformation of multiple series when
  different param values are used for different parallel
  jobs (i.e. test that `parallel_params` argument is treated
  correctly). Also tests that transformer correctly handles
  being provided with fewer input series than series used
  to fit the transformer.
docstr_tok: ["Tests","for","correct","transformation","of","multiple","series","when","different","param","values","are","used","for","different","parallel","jobs","(","i.e",".","test","that","`","parallel_params","`","argument","is","treated","correctly",")",".","Also","tests","that","transformer","correctly","handles","being","provided","with","fewer","input","series","than","series","used","to","fit","the","transformer","."]
code: def test_input_transformed_multiple_series(self):
      """
      Tests for correct transformation of multiple series when
      different param values are used for different parallel
      jobs (i.e. test that `parallel_params` argument is treated
      correctly). Also tests that transformer correctly handles
      being provided with fewer input series than series used
      to fit the transformer.
      """
      test_input_1 = constant_timeseries(value=1, length=10)
      test_input_2 = constant_timeseries(value=2, length=11)
      test_input_3 = constant_timeseries(value=3, length=12)
  
      # Don't have different params for different jobs:
      mock = self.DataTransformerMock(
          scale=2, translation=10, parallel_params=False
      )
      (transformed_1, transformed_2) = mock.fit_transform(
          (test_input_1, test_input_2)
      )
      # 2 * 1 + 10 = 12
      assert transformed_1 == constant_timeseries(value=12, length=10)
      # 2 * 2 + 10 = 14
      assert transformed_2 == constant_timeseries(value=14, length=11)
      # Should get input back:
      inv_1, inv_2 = mock.inverse_transform(
          (transformed_1, transformed_2)
      )
      assert inv_1 == test_input_1
      assert inv_2 == test_input_2
  
      # If only one timeseries provided, should apply parameters defined for
      # for the first to that series:
      transformed_1 = mock.transform(test_input_1)
      assert transformed_1 == constant_timeseries(value=12, length=10)
      inv_1 = mock.inverse_transform(transformed_1)
      assert inv_1 == test_input_1
  
      # Have different `scale` param for different jobs:
      mock = self.DataTransformerMock(
          scale=(2, 3), translation=10, parallel_params=["_scale"]
      )
      (transformed_1, transformed_2) = mock.fit_transform(
          (test_input_1, test_input_2)
      )
      # 2 * 1 + 10 = 12
      assert transformed_1 == constant_timeseries(value=12, length=10)
      # 3 * 2 + 10 = 16
      assert transformed_2 == constant_timeseries(value=16, length=11)
      # Should get input back:
      inv_1, inv_2 = mock.inverse_transform(
          (transformed_1, transformed_2)
      )
      assert inv_1 == test_input_1
      assert inv_2 == test_input_2
  
      # Have different `scale`, `translation`, and `stack_samples` params for different jobs:
      mock = self.DataTransformerMock(
          scale=(2, 3),
          translation=(10, 11),
          stack_samples=(False, True),
          mask_components=(False, False),
          parallel_params=True,
      )
      (transformed_1, transformed_2) = mock.fit_transform(
          (test_input_1, test_input_2)
      )
      # 2 * 1 + 10 = 12
      assert transformed_1 == constant_timeseries(value=12, length=10)
      # 3 * 2 + 11 = 17
      assert transformed_2 == constant_timeseries(value=17, length=11)
      # Should get input back:
      inv_1, inv_2 = mock.inverse_transform(
          (transformed_1, transformed_2)
      )
      assert inv_1 == test_input_1
      assert inv_2 == test_input_2
  
      # Train on three series with three different fixed param values,
      # but pass only one or two series as inputs to `transform` or
      # `inverse_transform`; transformer should use the parameters
      # fitted to `i`th series to apply `transform`/`inverse_transform`
      # to the `i`th input:
      mock = self.DataTransformerMock(
          scale=(2, 3, 4),
          translation=(10, 11, 12),
          stack_samples=(False, True, False),
          mask_components=(False, False, False),
          parallel_params=True,
      )
      mock.fit([test_input_1, test_input_2, test_input_3])
      # If single series provided to transformer trained on three
      # series, should transform/inverse transform using the first set
      # of fitted parameters:
      transformed_1 = mock.transform(test_input_1)
      assert transformed_1 == constant_timeseries(value=12, length=10)
      inv_1 = mock.inverse_transform(transformed_1)
      assert inv_1 == test_input_1
      # If two series provided to transformer trained on three
      # series, should transform/inverse transform using the first and
      # second set of fitted parameters:
      transformed_1, transformed_2 = mock.transform(
          (test_input_1, test_input_2)
      )
      assert transformed_1 == constant_timeseries(value=12, length=10)
      assert transformed_2 == constant_timeseries(value=17, length=11)
      inv_1, inv_2 = mock.inverse_transform(
          (transformed_1, transformed_2)
      )
      assert inv_1 == test_input_1
      assert inv_2 == test_input_2
  
file_path: darts/darts/tests/dataprocessing/transformers/test_invertible_fittable_data_transformer.py
imports: from typing import Any, Mapping, Sequence, Union
  import numpy
  from darts import TimeSeries
  from darts.dataprocessing.transformers.fittable_data_transformer import FittableDataTransformer
  from darts.dataprocessing.transformers.invertible_data_transformer import InvertibleDataTransformer
  from darts.utils.timeseries_generation import constant_timeseries
label_desc: Use image node_id 2 for calling the TestLocalFittableInvertibleDataTransformer obj's underlying member method code with example usage: obj.test_input_transformed_multiple_series() without return types