If I have an existing Python code block, then I create a function and try to use this function in Python it says "function2" is not defined:
However, if I make a new code block and copy/paste the contents of the old one into the new one it no longer throws this error: