def METHOD_NAME(lu_diag, pivot):
    log_value = complex(0.0,0.0)
    for i in range(4):
        pivot_factor = (1 - (2 * (pivot[i] != i)))
        diag = complex(lu_diag[i].real * pivot_factor, lu_diag[i].imag * pivot_factor)
        log_value += cmath.log(diag)
    return log_value