Please open the lab on coursera, on the menu bar of the lab jupyter notebook, click “File” > “Open”, then click on the filename “utils.py” to find the implementation.
You may also want to check out this post for the meaning of the equation used in the implementation.
Raymond