def METHOD_NAME(target: np.ndarray, forecast: np.ndarray, q: float) -> float:
    r"""
    .. math::
        quantile\_loss = 2 * sum(|(Y - \hat{Y}) * (Y <= \hat{Y}) - q|)
    """
    return 2 * np.sum(np.abs((forecast - target) * ((target <= forecast) - q)))