How to expose (or use) a module attribute that is built using macros

how do you call __query__(module, fields)
If you can share the module where you call use ?