You answered me "the key function and reverse are unrelated.", it was what i was not sure, so it seems Gemini is wrong to propose me this code !
Thanks you, subject is close.