def test_diff_multi_ts(self):
        """
        Tests that `Diff` correctly behaves when given multiple time series, both when a `component_mask`
        is provided and when one is not.
        """

        # (`lags`, `dropna`, `component_mask`) triplets; note that combination of `dropna = True``
        # AND `component_mask is not None` is not tested here, since this should throw error
        # (see `test_diff_dropna_and_component_mask_specified`):
        component_mask = np.array([True, False, True])
        test_cases = [
            (1, True, None),
            (1, False, None),
            ([1, 2, 3, 2, 1], True, None),
            ([1, 2, 3, 2, 1], False, None),
            (1, False, component_mask),
            ([1, 2, 3, 2, 1], False, component_mask),
        ]
        for lags, dropna, mask in test_cases:
            diff = Diff(lags=lags, dropna=dropna)
            transformed = diff.fit_transform(
                [self.sine_series, self.sine_series], component_mask=mask
            )
            if mask is not None:
                # Masked components should be undifferenced:
                self.assert_series_equal(
                    self.sine_series,
                    transformed[0],
                    equal_nan=(not dropna),
                    to_compare=~mask,
                )
                self.assert_series_equal(
                    self.sine_series,
                    transformed[1],
                    equal_nan=(not dropna),
                    to_compare=~mask,
                )
            # Should recover original sine_series:
            back = diff.inverse_transform(transformed, component_mask=mask)
            self.assert_series_equal(self.sine_series, back[0], equal_nan=(not dropna))
            self.assert_series_equal(self.sine_series, back[1], equal_nan=(not dropna))

        Tests that `Diff` correctly behaves when given multiple time series, both when a `component_mask`
        is provided and when one is not.
        
darts/tests/dataprocessing/transformers/test_diff.py