Python Nested Function Examples