def _verify_series(
        series: TimeSeries,
        high_freq: Optional[str] = None,
        low_freq: Optional[str] = None,
    ):
        """Some sanity checks on the input, the high_freq and low_freq arguments are mutually exclusive"""
        if not isinstance(series.time_index, pd.DatetimeIndex):
            raise_log(
                ValueError("MIDAS input series must have a pd.Datetime index"),
                logger,
            )

        series_freq_str = series.freq_str
        input_freq = [series_freq_str]
        # flexibility on anchoring
        if "-" in series_freq_str:
            input_freq.append(series_freq_str.split("-")[0])

        if high_freq is not None and high_freq not in input_freq:
            raise_log(
                ValueError(
                    f"The frequency string of the series to transform must be identical to the fitted one, expected "
                    f"{high_freq} but received {series_freq_str}."
                ),
                logger=logger,
            )
        if low_freq is not None and low_freq not in input_freq:
            raise_log(
                ValueError(
                    f"The frequency string of the series to inverse-transform must be identical to the fitted one, "
                    f"expected {low_freq} but received {series_freq_str}."
                ),
                logger=logger,
            )
Some sanity checks on the input, the high_freq and low_freq arguments are mutually exclusive
darts/dataprocessing/transformers/midas.py