That AI-generated version of my shiftdown is horseshit and will promptly be reported for spam.
Chat gpt version 4 considers the second option to be more visual and productive in terms of using intermediate results.

On a more serious note, don't use that script. It's slow. I made a C++ shiftdown that is 8x faster than this Python on a single thread, using GMP.
PM me if you want the download. It is not FOSS.