Python Add Method To Class Dynamically Allocate