def parse_module(self):
self.log.debug("<STR_LIT>")<EOL>start = self.line<EOL>docstring = self.parse_docstring()<EOL>children = list(self.parse_definitions(Module, dunder_all=True))<EOL>assert self.current is None, self.current<EOL>end = self.line<EOL>cls = Module<EOL>if self.filename.endswith('<STR_LIT>'):<EOL><INDENT>cls = Package<EOL><DEDENT>module = cls(self.filename, self.source, start, end,<EOL>[], docstring, children, None, self.dunder_all,<EOL>self.dunder_all_error, None, '<STR_LIT>')<EOL>for child in module.children:<EOL><INDENT>child.parent = module<EOL><DEDENT>module.future_imports = self.future_imports<EOL>self.log.debug("<STR_LIT>")<EOL>return module<EOL>
Parse a module (and its children) and return a Module object.