Corollary of the imaginary function
When you ask an artificial intelligence for help, the most elegant solution it offers will use a function that does not exist.
Generative artificial intelligence writes code with enviable confidence. It offers a clean, tidy solution, graciously commented. There is just one detail: it relies on a command nobody has ever invented. Except the AI, at that moment.
It's like asking directions from a very kind passer-by who doesn't want to disappoint you. 'The station? Straight on, second right, Garden Lane.' There is no Garden Lane. But he described it so well you almost feel sorry for the council.
Experts call these inventions hallucinations. I call them wished-for features: the AI isn't wrong, it is anticipating the programmers of the future. Meanwhile, before using any suggested line, I check that the command really exists. It's an ancient, almost artisanal practice. It's called reading the documentation, preferably for the right version.