def has_ancestor(cls, obj):
    """Return whether this object has another object as an ancestor.

        :param HasParent obj: The object to search for
        :returns bool: Whether the object was found in this object's ancestry

        """
    return obj in cls.get_ancestors()
