Thanks a lot for the advice, slbaumgartner and TIG.
Will try the codes later.
Another question, if you don't mind. Assuming we do not confine the entire code within it's own namespace (module), will there be a chance that name of the customised formula clashes with someone's else?
If we have created another unique formula for the dynamic component, for example, def qwer(a) and qwer(a)=a+a+a. Is there any way from preventing others from using the same name as qwer(a)?