Where is gradient_function in lab4

I have tried to do the lab on jupyter-lab on my computer, but the results are “nan”, which idk wrong cause the problem. But one thing that I noticed is that there is no declaration of function gradient_function, but the function is called in the lab. Please help, I don’t know what cause the problem.

See the File menu in the Coursera Labs page.

Each lab has various dependencies, obtained from the coursera working environment

Downloading the notebook in isolation may be the reason behind the nan output. It may also be the reason behind the absent function declaration

I know this is a late reply but in case someone comes looking for this:

gradient_function is a function passed as an argument to the gradient_descent() function and it refers to compute_gradient() function defined earlier in the notebook.