Function Code all on one line

I'll bet you have node-red-contrib-python3-function installed and as @Andrei says you are not on a recent version of NR

see Problems with the function node in 0.20.2