def METHOD_NAME(cls, elem: typing.Union[Tag, NavigableString]) -> bool:
    if cls._has_attr_value(elem, "class", ProprietaryHTMLAttrValues.Gmail_signature_class):
        return True
    if cls._has_attr_value(elem, "class", ProprietaryHTMLAttrValues.Gmail_extras_class):
        for child in elem.children:
            if cls._has_attr_value(
                child, "class", ProprietaryHTMLAttrValues.Gmail_signature_class
            ):
                return True
    if isinstance(elem, Tag) and elem.name.lower() == "div":
        for child in elem.children:
            if cls._has_attr_value(
                child, "class", ProprietaryHTMLAttrValues.Gmail_signature_class
            ):
                return True
    return False