@staticmethod
def _check_quantile_range(quantile_range):
    """
        Checks for the validity of quantile_range.
        """
    if not isinstance(quantile_range, tuple) and not isinstance(quantile_range,
        list):
        raise TypeError('quantile_range must be a tuple or a list')
    if len(quantile_range) != 2:
        raise ValueError(
            'quantile_range must contain 2 elements: min_quantile and max_quantile'
            )
    min_quantile, max_quantile = quantile_range
    for quantile in (min_quantile, max_quantile):
        if not isinstance(quantile, float) and not isinstance(quantile, int):
            raise TypeError('min_quantile and max_quantile must be numbers')
        if quantile < 0 or 100 < quantile:
            raise ValueError(
                'min_quantile and max_quantile must be in [0; 100]')
    if min_quantile > max_quantile:
        raise ValueError(
            'min_quantile must be less than or equal to max_quantile')
