def _pairwise(true, pred):
    """Return numerators and denominators for precision and recall,
    as well as size of symmetric difference, used in negative pairwise."""
    p_num = r_num = len(true & pred)
    p_den = len(pred)
    r_den = len(true)
    return p_num, p_den, r_num, r_den
