def getAttributeNode(self, attr: str) -> Optional[Attr]:
        """Get attribute of this node as Attr format.

        If this node does not have ``attr``, return None.
        """
        return self.attributes.getNamedItem(attr)