The reason that's especially interesting is that I was using an AI to write something that needed that functionality, and it spewed out that same Python code, which I recognized immediately. It was slightly modified with respect to naming and comments because, I assume, it was stored slightly imperfectly in the model's weights.
This is what engineering is all about. Applying what it long known to solve new problems, or old problems better.
LLMs are a triumph today because someone made a keystone observation