Python Nested Function Global Variable And Local Variable Vs Instance