Mark deduction at NLP Course 4, Week 1

I’ve implement the code and submit, however, my exercise 8 is not passing the grade, however it passes the test. Below is the error code

It appears your code does not return the correct results for that test which the grader uses.
The grader uses different tests than those used in the notebook.

This means there is an error in your code.