def parse_sim_file_wapo(filename):
    """
    Reads the deduplicated documents file and stores the
    duplicate passage ids into a dictionary
    Portion of code from https://github.com/grill-lab/trec-cast-tools
    """
    # Creates a dict for duplicates for easy access
    dup_dict = {}
    print("dic start")
    data_dups = open(filename).readlines()
    for each in data_dups:
        idxs = each.strip().split(':')
        if len(idxs[-1]) > 0:
            all_idxs = idxs[-1].split(',')
            for every in all_idxs:
                dup_dict[every] = 1
    print("dic end")

    return dup_dict