How to auto import what upper module has imported to the inner module

Hi fellows,

I have question

module Outer
   using X.Y.Z
   import A.B
   module GeneratedInner
     #include statements 

I need to write a macro which can get what outer module has imported and re import them in the newly generatedInner module.

So is there a function which can tell me what the outer module has imported?