def mse_node(w_samples, y_sum, y_sq_sum):
    """Computes the variance of the labels in the node

    Parameters
    ----------
    w_samples : float
        Weighted number of samples in the node

    y_sum : float
        Weighted sum of the label in the node

    y_sq_sum : float
        Weighted sum of the squared labels in the node

    Returns
    -------
    output : float
        Variance of the labels in the node
    """
    return y_sq_sum / w_samples - (y_sum / w_samples) ** 2