This error probably means you are using an obsolete copy of the notebook file or the w1_unittest.py file.
I recommend you update both to the current version. You’ll need to re-enter your code in the notebook.
Instructions for getting the current files can be found here:
https://community.deeplearning.ai/t/math-for-machine-learning-faq/443624