As helpful as ChatGPT was in writing code, one needs to be especially careful with the date of the training data. Its knowledge base ends in 2021. In the meantime, countless packages and libraries were updated, and function names have changed.