def apply_to_links(self, func):
        # Apply to images from IMG tag
        for a in self.tree.xpath(".//a"):
            if a.attrib in 'href':
                a.attrib['href'] = func(a.attrib['href'], element=a)
dataset/ETHPy150Open lavr/python-emails/emails/transformer.py/HTMLParser.apply_to_links/swapped operands of `in`