def _id_or_key(list_item):
    '''
    Return the value at key 'id' or 'key'.
    '''
    if isinstance(list_item, dict):
        if 'id' in list_item:
            return list_item['id']
        if 'key' in list_item:
            return list_item['key']
    return list_item
dataset/ETHPy150Open saltstack/salt/salt/states/boto_datapipeline.py/_id_or_key/original