def find_descriptor(cls, attrname):
    """Find the descriptor of an attribute."""

    def hasspecialmethod(obj, name):
        return any(name in klass.__dict__ for klass in type(obj).__mro__)

    for klass in cls.__mro__:
        if attrname in klass.__dict__:
            descriptor = klass.__dict__[attrname]
            if not hasspecialmethod(descriptor, "__get__"):
                return None
            return descriptor
    return None