How can I get a reference to a module from within that module? Also, how can I get a reference to the package containing that module?
If all you need is to get access to module variable then use globals()['bzz'] (or vars()['bzz'] if it's module level).
How to get a reference to a module inside the module itself?