def compile(self, module):
imports, depends = self.get_dependencies(module)<EOL>file_list = list(imports | depends) + [module]<EOL>cmd_list = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', self.pyang_plugins]<EOL>cmd_list += ['<STR_LIT>', self.dir_yang]<EOL>cmd_list += [self.dir_yang + '<STR_LIT:/>' + f + '<STR_LIT>' for f in file_list]<EOL>logger.info('<STR_LIT>'.format(module,<EOL>'<STR_LIT:U+0020>'.join(cmd_list)))<EOL>p = Popen('<STR_LIT:U+0020>'.join(cmd_list), shell=True, stdout=PIPE, stderr=PIPE)<EOL>stdout, stderr = p.communicate()<EOL>logger.info('<STR_LIT>'.format(p.returncode))<EOL>if p.returncode == <NUM_LIT:0>:<EOL><INDENT>logger.debug(stderr.decode())<EOL><DEDENT>else:<EOL><INDENT>logger.error(stderr.decode())<EOL><DEDENT>parser = etree.XMLParser(remove_blank_text=True)<EOL>tree = etree.XML(stdout.decode(), parser)<EOL>return Model(tree)<EOL>
compile

        High-level api: Compile a module.

        Parameters
        ----------

        module : `str`
            Module name that is inquired about.

        Returns
        -------

        Model
            A Model object.