def make_outlier_quantile_mask(series, lower_quantile, upper_quantile,
    series_for_threshes=None):
    """Create mask that is True for all values below / above boundaries

    Args:
        series: (pd.Series) the series to derive mask from
        lower_quantile: (float) lower bound
        upper_quantile: (float) upper bound
        series_for_threshes: (pd.Series) optionally, use a second series to get thresholds from

    Returns:
        (pd.Series) mask with same index as `series` that is True where for values outside of
        thresholds
    """
    if series_for_threshes is None:
        series_for_threshes = series
    lower_thresh = series_for_threshes.quantile(lower_quantile)
    upper_thresh = series_for_threshes.quantile(upper_quantile)
    return (series < lower_thresh) | (series > upper_thresh)
