Python Add Function To Class Dynamically Induced