def remove_link(self, rel, value=None, href=None):
links_node = self.metadata.find('<STR_LIT>')<EOL>if links_node is None:<EOL><INDENT>log.warning('<STR_LIT>')<EOL>return False<EOL><DEDENT>counter = <NUM_LIT:0><EOL>links = links_node.xpath('<STR_LIT>'.format(rel))<EOL>for link in links:<EOL><INDENT>if value and href:<EOL><INDENT>if link.text == value and link.attrib['<STR_LIT>'] == href:<EOL><INDENT>links_node.remove(link)<EOL>counter += <NUM_LIT:1><EOL><DEDENT><DEDENT>elif value and not href:<EOL><INDENT>if link.text == value:<EOL><INDENT>links_node.remove(link)<EOL>counter += <NUM_LIT:1><EOL><DEDENT><DEDENT>elif not value and href:<EOL><INDENT>if link.attrib['<STR_LIT>'] == href:<EOL><INDENT>links_node.remove(link)<EOL>counter += <NUM_LIT:1><EOL><DEDENT><DEDENT>else:<EOL><INDENT>links_node.remove(link)<EOL>counter += <NUM_LIT:1><EOL><DEDENT><DEDENT>return counter<EOL>
Removes link nodes based on the function arguments.

This can remove link nodes based on the following combinations of arguments:
    link/@rel
    link/@rel & link/text()
    link/@rel & link/@href
    link/@rel & link/text() & link/@href

:param rel: link/@rel value to remove.  Required.
:param value: link/text() value to remove. This is used in conjunction with link/@rel.
:param href: link/@href value to remove. This is used in conjunction with link/@rel.
:return: Return the number of link nodes removed, or False if no nodes are removed.