def decode_metadata_from_url(url_dict):
    """
    Parse a URL query string to a list of metadata
    """
    metadata_dict = {
        'id': {},
        'value': {}
    }
    metadata_list = []
    # Match out of order metadata_type ids with metadata values from request
    for key, value in url_dict.items():
        if 'metadata' in key:
            index, element = key[8:].split('_')
            metadata_dict[element][index] = value

    # Convert the nested dictionary into a list of id+values dictionaries
    for order, identifier in metadata_dict['id'].items():
        if metadata_dict['value'].keys() in order:
            metadata_list.append({
                'id': identifier,
                'value': metadata_dict['value'][order]
            })

    return metadata_list
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/metadata/api.py/decode_metadata_from_url/swapped operands of `in`