def test_global_fitting(self):
        """
        Tests that `Scaler` correctly handles situation where `global_fit = True`. More
        specifically, test checks that global fitting with two disjoint series
        produces same fitted parameters as local fitting with a single series formed
        by 'gluing' these two disjoint series together.
        """
        sine_series = sine_timeseries(length=50, value_y_offset=5, value_frequency=0.05)
        lin_series = linear_timeseries(start_value=1, end_value=10, length=50)
        series_combined = sine_series.append_values(lin_series.all_values())
        local_fitted_scaler = (
            Scaler(global_fit=False).fit(series_combined)._fitted_params[0]
        )
        global_fitted_scaler = (
            Scaler(global_fit=True).fit([sine_series, lin_series])._fitted_params[0]
        )
        assert local_fitted_scaler.get_params() == global_fitted_scaler.get_params()

        Tests that `Scaler` correctly handles situation where `global_fit = True`. More
        specifically, test checks that global fitting with two disjoint series
        produces same fitted parameters as local fitting with a single series formed
        by 'gluing' these two disjoint series together.
        
darts/tests/dataprocessing/transformers/test_data_transformer.py