Python Persistent Variable In Function In Java