def preproc_meta(metadata):
    """
    For easier access, convert the metadata list into a dictionary where
    the ids are the keys
    """
    res = {}
    for x in metadata:
        try:
            k = x["_id"]
        except KeyError:
            continue
        res[k] = x
    return res