I've seen something like that happen but with a different function and language.
A good few months back I came across some early Linux program to use some LLM to generate code. I wondered if it had imbibed the Free Pascal Library so I asked for code to generate a UUID of a specific version, number (I can't remember which). It certainly hadn't. It wrote a few lines of Pascal with a UUID (not of the correct version embeded as a literal whd wrote it out.