def METHOD_NAME(self, node: DOMNode) -> bool:
    if not node.has_class(self.name):
        return False
    if self.pseudo_classes and not node.has_pseudo_class(*self.pseudo_classes):
        return False
    return True