def interval_support(func) -> Callable[..., METRIC_OUTPUT_TYPE]:
    """
    This decorator adds support for quantile interval metrics with sanity checks, processing, and extraction of
    quantiles from the intervals.
    """

    @wraps(func)
    def wrapper_interval_support(*args, **kwargs):
        q = kwargs.get("q")
        if q is not None:
            raise_log(
                ValueError(
                    "`q` is not supported for quantile interval metrics; use `q_interval` instead."
                )
            )
        q_interval = kwargs.get("q_interval")
        if q_interval is None:
            raise_log(
                ValueError("Quantile interval metrics require setting `q_interval`.")
            )
        if isinstance(q_interval, tuple):
            q_interval = [q_interval]
        q_interval = np.array(q_interval)
        if not q_interval.ndim == 2 or q_interval.shape[1] != 2:
            raise_log(
                ValueError(
                    "`q_interval` must be a tuple (float, float) or a sequence of tuples (float, float)."
                ),
                logger=logger,
            )
        if not np.all(q_interval[:, 1] - q_interval[:, 0] > 0):
            raise_log(
                ValueError(
                    "all intervals in `q_interval` must be tuples of (lower q, upper q) with `lower q > upper q`. "
                    f"Received `q_interval={q_interval}`"
                ),
                logger=logger,
            )
        kwargs["q_interval"] = q_interval
        kwargs["q"] = np.sort(np.unique(q_interval))
        return func(*args, **kwargs)

    return wrapper_interval_support

    This decorator adds support for quantile interval metrics with sanity checks, processing, and extraction of
    quantiles from the intervals.
    
darts/metrics/metrics.py