def get_acc_id_dict(id_acc_dict):
    """Invert a dictionary.

    Receives a dictionary where Key = PhageID and Value = Accession.
    Returns a dictionary where Key = Accession and Value = List[PhageIDs]
    Accessions are not guaranteed to be unique.
    """
    new_dict = {}
    for key in id_acc_dict.keys():
        accession = id_acc_dict[key]
        if accession is not None and accession != '':
            if accession not in new_dict.keys():
                new_dict[accession] = [key]
            else:
                new_dict[accession] = new_dict[accession].append(accession)
    return new_dict
