def __main__(): let module = object() def aFunction(withArgs): print("I have a module:", str(module)[:20]) return withArgs module.aFunction = aFunction return module let mod = __main__() mod.aFunction("foo")