def __init__(
        self,
        model: GlobalForecastingModel,
        scorer: Union[AnomalyScorer, Sequence[AnomalyScorer]],
    ):
        """Forecasting-based Anomaly Detection Model

        The forecasting model must be a `GlobalForecastingModel` that may or may not be already fitted. The
        underlying assumption is that `model` should be able to accurately forecast the series in the absence of
        anomalies. For this reason, it is recommended to either provide a model that has already been fitted and
        evaluated to work appropriately on a series without anomalies, or to ensure that a simple call to the
        :func:`fit()` method of the model will be sufficient to train it to satisfactory performance on a series
        without anomalies. The pre-trained model will be used to generate forecasts when calling :func:`score()`.

        Calling :func:`fit()` on the anomaly model will fit the underlying forecasting model only if
        `allow_model_training` is set to `True` upon calling `fit()`.
        In addition, calling :func:`fit()` will also fit the fittable scorers, if any.

        Parameters
        ----------
        model
            An instance of a Darts forecasting model.
        scorer
            One or multiple scorer(s) that will be used to compare the actual and predicted time series in order
            to obtain an anomaly score `TimeSeries`.
            If a list of `N` scorers is given, the anomaly model will call each
            one of the scorers and output a list of `N` anomaly scores `TimeSeries`.
        """
        if not isinstance(model, GlobalForecastingModel):
            raise_log(
                ValueError("`model` must be a Darts `GlobalForecastingModel`."),
                logger=logger,
            )
        self.model = model
        super().__init__(model=model, scorer=scorer)
Forecasting-based Anomaly Detection Model

        The forecasting model must be a `GlobalForecastingModel` that may or may not be already fitted. The
        underlying assumption is that `model` should be able to accurately forecast the series in the absence of
        anomalies. For this reason, it is recommended to either provide a model that has already been fitted and
        evaluated to work appropriately on a series without anomalies, or to ensure that a simple call to the
        :func:`fit()` method of the model will be sufficient to train it to satisfactory performance on a series
        without anomalies. The pre-trained model will be used to generate forecasts when calling :func:`score()`.

        Calling :func:`fit()` on the anomaly model will fit the underlying forecasting model only if
        `allow_model_training` is set to `True` upon calling `fit()`.
        In addition, calling :func:`fit()` will also fit the fittable scorers, if any.

        Parameters
        ----------
        model
            An instance of a Darts forecasting model.
        scorer
            One or multiple scorer(s) that will be used to compare the actual and predicted time series in order
            to obtain an anomaly score `TimeSeries`.
            If a list of `N` scorers is given, the anomaly model will call each
            one of the scorers and output a list of `N` anomaly scores `TimeSeries`.
        
darts/ad/anomaly_model/forecasting_am.py