import inspect


def get_descriptor(cls, descname):
    """
    Returns the descriptor object that is stored under *descname* instead of
    whatever the descriptor would have returned from its `__get__()` method.
    :param cls: class to find the descriptor on
    :param descname: name of the descriptor
    :return: the descriptor stored under *descname* on *instance*
    """
    return inspect.getattr_static(cls, descname)