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