def _add_links(self, links, key="<STR_LIT>", proxy_key="<STR_LIT>", endpoints=None):
if endpoints is None:<EOL><INDENT>endpoints = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>if links.get("<STR_LIT>"):<EOL><INDENT>for endpoint in links['<STR_LIT>']:<EOL><INDENT>if isinstance(links['<STR_LIT>'][endpoint], dict):<EOL><INDENT>self._add_link(endpoint, links['<STR_LIT>'][endpoint]["<STR_LIT>"])<EOL><DEDENT>else:<EOL><INDENT>self._add_link(endpoint, links["<STR_LIT>"][endpoint])<EOL><DEDENT><DEDENT><DEDENT>for endpoint in endpoints:<EOL><INDENT>if links.get(endpoint, None) is None:<EOL><INDENT>continue<EOL><DEDENT>if "<STR_LIT>" in links[endpoint]:<EOL><INDENT>self._add_link(endpoint, links[endpoint]["<STR_LIT>"][proxy_key])<EOL><DEDENT>elif "<STR_LIT:url>" in links[endpoint]:<EOL><INDENT>self._add_link(endpoint, links[endpoint]["<STR_LIT:url>"])<EOL><DEDENT>else:<EOL><INDENT>self._add_link(endpoint, links[endpoint][key])<EOL><DEDENT><DEDENT>return self.links<EOL>
Parses and adds block of links