def visit_Module(self, n): L = [ O.Import([O.alias("twisted.web.resource", "_GWFAL_twr")]), O.Import([O.alias("gwfal", "_GWFAL")]), O.Assign([O.Name("_GWFAL_root", O.Store())], O.Call(O.Attribute(O.Name("_GWFAL_twr", O.Load()), "Resource", O.Load()), [], [], None, None)), ] for c in n.body: c = self.visit(c) if isinstance(c, O.AST): L.append(O.fix_missing_locations(c)) else: L.extend(O.fix_missing_locations(s) for s in c) L.append(O.Expr( O.Call(O.Attribute(O.Name("_GWFAL", O.Load()), "_", O.Load()), [O.Num(b), O.Name("_GWFAL_root", O.Load())], [], None, None))) return O.Module([O.fix_missing_locations(a) for a in L])