code: def ts_fit(
      series: Union[TimeSeries, Sequence[TimeSeries]],
      params: Mapping[str, Any],
      *args,
      **kwargs,
  ) -> Any:
      transformer = deepcopy(params["fixed"]["transformer"])
      # If `global_fit` is `True`, then `series` will be ` Sequence[TimeSeries]`;
      # otherwise, `series` is a single `TimeSeries`:
      if isinstance(series, TimeSeries):
          series = [series]
      vals = np.concatenate(
          [Scaler.stack_samples(ts) for ts in series], axis=0
      )
      scaler = transformer.fit(vals)
      return scaler
  
file_path: darts/darts/dataprocessing/transformers/scaler.py
imports: from copy import deepcopy
  from typing import Any, Mapping, Sequence, Union
  import numpy
  from sklearn.preprocessing import MinMaxScaler
  from darts.logging import get_logger, raise_log
  from darts.timeseries import TimeSeries
  from .fittable_data_transformer import FittableDataTransformer
  from .invertible_data_transformer import InvertibleDataTransformer
label_desc: Use image node_id 4 for calling the Scaler obj's underlying member method code with example usage: obj.ts_fit(series, params) and returns: scaler