On one of the advent of code problems I had struggled through the logic and finally just needed one function to merge overlapping segment together. I was tired so I asked ChatGPT for a function and gave a sample of the input Out pops fully doc