def __init__(
        self,
        low_threshold: Union[int, float, Sequence[float], None] = None,
        high_threshold: Union[int, float, Sequence[float], None] = None,
    ) -> None:
        """Threshold Detector

        Flags values that are either below or above the `low_threshold` and `high_threshold`,
        respectively.

        If a single value is provided for `low_threshold` or `high_threshold`, this same
        value will be used across all components of the series.

        If sequences of values are given for the parameters `low_threshold` and/or `high_threshold`,
        they must be of the same length, matching the dimensionality of the series passed
        to `detect()`, or have a length of 1. In the latter case, this single value will be used
        across all components of the series.

        If either `low_threshold` or `high_threshold` is None, the corresponding bound will not be used.
        However, at least one of the two must be set.

        Parameters
        ----------
        low_threshold
            (Sequence of) lower bounds. If a sequence, must match the dimensionality of the series this
            detector is applied to.
        high_threshold
            (Sequence of) upper bounds. If a sequence, must match the dimensionality of the series this
            detector is applied to.
        """
        super().__init__()
        low_threshold, high_threshold = self._prepare_boundaries(
            lower_bound=low_threshold,
            upper_bound=high_threshold,
            lower_bound_name="low_threshold",
            upper_bound_name="high_threshold",
        )
        self._low_threshold = low_threshold
        self._high_threshold = high_threshold
Threshold Detector

        Flags values that are either below or above the `low_threshold` and `high_threshold`,
        respectively.

        If a single value is provided for `low_threshold` or `high_threshold`, this same
        value will be used across all components of the series.

        If sequences of values are given for the parameters `low_threshold` and/or `high_threshold`,
        they must be of the same length, matching the dimensionality of the series passed
        to `detect()`, or have a length of 1. In the latter case, this single value will be used
        across all components of the series.

        If either `low_threshold` or `high_threshold` is None, the corresponding bound will not be used.
        However, at least one of the two must be set.

        Parameters
        ----------
        low_threshold
            (Sequence of) lower bounds. If a sequence, must match the dimensionality of the series this
            detector is applied to.
        high_threshold
            (Sequence of) upper bounds. If a sequence, must match the dimensionality of the series this
            detector is applied to.
        
darts/ad/detectors/threshold_detector.py