“Time flies like an arrow; fruit flies like a banana” – popular pun of unknown origin, which relies on an instance of antanaclasis to create a second kind of wordplay, the “garden path sentence,” which “tricks” the reader into expecting something else or confusing meaning in the second half of the sentence.

ThoughtCo

TIME BANANA

This is yet another term from that repository of extraordinary expressions, the field of rhetoric. It refers to the trick of repeating the last word of a sentence, line, or clause, at or near the beginning of the next.

anadiplosis