def _data_build(self, data, modname, path):
try:<EOL><INDENT>node = _parse(data + "<STR_LIT:\n>")<EOL><DEDENT>except (TypeError, ValueError, SyntaxError) as exc:<EOL><INDENT>raise exceptions.AstroidSyntaxError(<EOL>"<STR_LIT>",<EOL>source=data,<EOL>modname=modname,<EOL>path=path,<EOL>error=exc,<EOL>) from exc<EOL><DEDENT>if path is not None:<EOL><INDENT>node_file = os.path.abspath(path)<EOL><DEDENT>else:<EOL><INDENT>node_file = "<STR_LIT>"<EOL><DEDENT>if modname.endswith("<STR_LIT>"):<EOL><INDENT>modname = modname[:-<NUM_LIT:9>]<EOL>package = True<EOL><DEDENT>else:<EOL><INDENT>package = (<EOL>path is not None<EOL>and os.path.splitext(os.path.basename(path))[<NUM_LIT:0>] == "<STR_LIT>"<EOL>)<EOL><DEDENT>builder = rebuilder.TreeRebuilder(self._manager)<EOL>module = builder.visit_module(node, modname, node_file, package)<EOL>module._import_from_nodes = builder._import_from_nodes<EOL>module._delayed_assattr = builder._delayed_assattr<EOL>return module<EOL>
Build tree node from data and add some informations