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 += complex(math.log(math.sqrt(diag.real * diag.real + diag.imag * diag.imag)), 0)
        log_value += complex(0, math.atan2(diag.imag, diag.real))
        print(math.atan2(diag.imag, diag.real))
    return log_value