It would be pulled in like an include or some other mechanism and be in the same scope as the calling custom function in a rule.
Private Extensions in Launch should solve your problem:
Private Extensions are Coming!
I often use DTM data elements to provide functions or function libraries.
For example, in a DTM (custom code) data element named "func_addTwoNumbers", I might have this:
Then in a number of places where I want to use this function, I would do this:
Alternately you could do this: