Got a bug in my old code that transforms an array of nested product categories into a sequence of IDs of parent to child by a given category ID. I can't even understand my code. So, I tried asking ChatGPT. Just change some variables' names and it works flawlessly!