def build_urls(self: NodeVisitor, node: inheritance_diagram) -> Mapping[str, str]:
current_filename = self.builder.current_docname + self.builder.out_suffix<EOL>urls = {}<EOL>for child in node:<EOL><INDENT>if child.get("<STR_LIT>") is not None:<EOL><INDENT>uri = child.get("<STR_LIT>")<EOL>package_path = child["<STR_LIT>"]<EOL>if uri.startswith("<STR_LIT:http>"):<EOL><INDENT>_, _, package_path = uri.partition("<STR_LIT:#>")<EOL><DEDENT>else:<EOL><INDENT>uri = (<EOL>pathlib.Path("<STR_LIT:..>")<EOL>/ pathlib.Path(current_filename).parent<EOL>/ pathlib.Path(uri)<EOL>)<EOL>uri = str(uri).replace(os.path.sep, "<STR_LIT:/>")<EOL><DEDENT>urls[package_path] = uri<EOL><DEDENT>elif child.get("<STR_LIT>") is not None:<EOL><INDENT>urls[child["<STR_LIT>"]] = (<EOL>"<STR_LIT>" + current_filename + "<STR_LIT:#>" + child.get("<STR_LIT>")<EOL>)<EOL><DEDENT><DEDENT>return urls<EOL>
Builds a mapping of class paths to URLs.