Nested Function Example In Python