Removing unnecessary second initialization in python module