def _exhange(obj, key):
    """Exchange provided key for mapped version"""
    if hasattr(obj, 'attribute_map'):
        for k, v in obj.attribute_map.items():
            if v == key:
                return k
    return None
