def imbalances_after_move(ws, p_src, p_tgt, nbr_p, imbs):
    """Returns the imbalances if [ws] is moved from [p_src] to
    [p_tgt]. [ws] must be normalized.
    """
    new_imbs = [list(imbs_per_c) for imbs_per_c in imbs]
    for w, imbs_per_c in zip(ws, new_imbs):
        imbs_per_c[p_src] -= nbr_p * w
        imbs_per_c[p_tgt] += nbr_p * w
    return new_imbs