def incrementSparseVector(v1, scale, v2):
    """
    Given two sparse vectors |v1| and |v2|, perform v1 += scale * v2.
    This function will be useful later for linear classifiers.
    """
    # BEGIN_YOUR_CODE (our solution is 2 lines of code, but don't worry if you deviate from this)
    for k, val in v2.items():
        v2[k] *= scale
    v_tmp = v1.copy()
    for k in v1.keys():
        for k2 in v2.keys():
            if k == k2:
                v_tmp[k] += v2[k2]
            else:
                v_tmp[k2] = v2[k2]
    return v_tmp
    # END_YOUR_CODE