I think all the code you are executing there was just given to you. Are you sure you didn’t accidentally modify some of the syntax in the “Generator” block?
It might be worth getting a clean copy of the notebook and then just carefully copying over your code from the “YOUR CODE HERE” sections.