def fit_transform(
        self,
        series: Union[TimeSeries, Sequence[TimeSeries]],
        *args,
        component_mask: Optional[np.array] = None,
        **kwargs,
    ) -> Union[TimeSeries, list[TimeSeries]]:
        """Fit the transformer to the (sequence of) series and return the transformed input.

        Parameters
        ----------
        series
            the (sequence of) series to transform.
        args
            Additional positional arguments passed to the :func:`ts_transform` and :func:`ts_fit` methods.
        component_mask : Optional[np.ndarray] = None
            Optionally, a 1-D boolean np.ndarray of length ``series.n_components`` that specifies which
            components of the underlying `series` the transform should be fitted and applied to.
        kwargs
            Additional keyword arguments passed to the :func:`ts_transform` and :func:`ts_fit` methods.

        Returns
        -------
        Union[TimeSeries, Sequence[TimeSeries]]
            Transformed data.
        """
        return self.fit(
            series, *args, component_mask=component_mask, **kwargs
        ).transform(series, *args, component_mask=component_mask, **kwargs)
Fit the transformer to the (sequence of) series and return the transformed input.

        Parameters
        ----------
        series
            the (sequence of) series to transform.
        args
            Additional positional arguments passed to the :func:`ts_transform` and :func:`ts_fit` methods.
        component_mask : Optional[np.ndarray] = None
            Optionally, a 1-D boolean np.ndarray of length ``series.n_components`` that specifies which
            components of the underlying `series` the transform should be fitted and applied to.
        kwargs
            Additional keyword arguments passed to the :func:`ts_transform` and :func:`ts_fit` methods.

        Returns
        -------
        Union[TimeSeries, Sequence[TimeSeries]]
            Transformed data.
        
darts/dataprocessing/transformers/fittable_data_transformer.py