def _is_descriptor(obj):
    """Returns True if obj is a descriptor, False otherwise.
    From cpython Enum"""
    return hasattr(obj, '__get__') or hasattr(obj, '__set__') or hasattr(obj,
        '__delete__')
