How to fix SyntaxError: 'return' outside function in Python | DevErrors