code: def test_scaling(self):
      self.series3 = self.series1[:1]
      transformer1 = Scaler(MinMaxScaler(feature_range=(0, 2)))
      transformer2 = Scaler(StandardScaler())
  
      series1_tr1 = transformer1.fit_transform(self.series1)
      series1_tr2 = transformer2.fit_transform(self.series1)
      series3_tr2 = transformer2.transform(self.series3)
  
      # should have the defined name above
      assert self.series1.columns[0] == "series1"
  
      # should keep columns pd.Index
      assert self.col_1 == series1_tr1.columns
  
      # should comply with scaling constraints
      assert (
          round(abs(min(series1_tr1.values().flatten()) - 0.0), 7) == 0
      )
      assert (
          round(abs(max(series1_tr1.values().flatten()) - 2.0), 7) == 0
      )
      assert (
          round(abs(np.mean(series1_tr2.values().flatten()) - 0.0), 7)
          == 0
      )
      assert (
          round(abs(np.std(series1_tr2.values().flatten()) - 1.0), 7)
          == 0
      )
  
      # test inverse transform
      series1_recovered = transformer2.inverse_transform(series1_tr2)
      series3_recovered = transformer2.inverse_transform(series3_tr2)
      np.testing.assert_almost_equal(
          series1_recovered.values().flatten(),
          self.series1.values().flatten(),
      )
      assert series1_recovered.width == self.series1.width
      assert series3_recovered == series1_recovered[:1]
  
file_path: darts/darts/tests/dataprocessing/transformers/test_data_transformer.py
imports: import numpy
  from sklearn.preprocessing import MinMaxScaler, StandardScaler
  from darts import TimeSeries
  from darts.dataprocessing.transformers import Scaler
  from darts.utils import timeseries_generation
  from darts.utils.timeseries_generation import linear_timeseries, sine_timeseries
label_desc: Use image node_id 1 for calling the TestDataTransformer obj's underlying member method code with example usage: obj.test_scaling() without return types