class_docstr: Expands all imports into full paths.
  
  Attributes
  ----------
  imports : {str}
      Imported module (python base module name)
  symbols : {str : (str,)}
      Matching between used name and real cxx name.
  
  Examples
  --------
  >>> import gast as ast
  >>> from pythran import passmanager, backend
  >>> node = ast.parse("from math import cos ; cos(2)")
  >>> pm = passmanager.PassManager("test")
  >>> _, node = pm.apply(ExpandImports, node)
  >>> print(pm.dump(backend.Python, node))
  import math as __pythran_import_math
  __pythran_import_math.cos(2)
  >>> node = ast.parse("from os.path import join ; join('a', 'b')")
  >>> _, node = pm.apply(ExpandImports, node)
  >>> print(pm.dump(backend.Python, node))
  import os as __pythran_import_os
  __pythran_import_os.path.join('a', 'b')
docstr: Visit the whole module and add all import at the top level.
  
  >> import numpy.linalg
  
  Becomes
  
  >> import numpy
docstr_tok: ["Visit","the","whole","module","and","add","all","import","at","the","top","level",".",">",">","import","numpy.linalg","Becomes",">",">","import","numpy"]
code: def visit_Module(self, node):
      """
      Visit the whole module and add all import at the top level.
  
      >> import numpy.linalg
  
      Becomes
  
      >> import numpy
  
      """
      node.body = [k for k in (self.visit(n) for n in node.body) if k]
      imports = [
          ast.Import([ast.alias(i, mangle(i))]) for i in self.imports
      ]
      node.body = imports + node.body
      ast.fix_missing_locations(node)
      return node
  
file_path: catboost/contrib/python/pythran/pythran/transformations/expand_imports.py
imports: from pythran.passmanager import Transformation
  from pythran.utils import path_to_attr, path_to_node
  from pythran.conversion import mangle
  from pythran.syntax import PythranSyntaxError
  from pythran.analyses import Ancestors
  import gast
label_desc: Use image node_id 2 for calling the ExpandImports obj's underlying member method code with example usage: obj.visit_Module(node) and returns: node