def _buildD(vd, dims, N):
    """
    Builds the effective drift matrices by multiplying by the 1/4N coeff

    vd : List containing the drift matrices

    dims : List containing the pop sizes
    
    N : List containing the effective pop sizes for each pop 

    Returns a list of effective drift matrices for each pair of pops
    """ 
    if (len(dims) == 1): return [1.0 / 4 / N[0] * vd[0][0]]
    res = []
    ctr = 0
    for i in range(len(dims)):
        for j in range(i + 1, len(dims)):
            res.append(1.0/(4*N[i])*vd[ctr][0] + 1.0/(4*N[j])*vd[ctr][1])
            ctr += 1
    return res