def merge_pept_dicts(list_of_pept_dicts:list)->dict:
    """
    Merge a list of peptide dict into a single dict.
    Args:
        list_of_pept_dicts (list of dict): the key of the pept_dict is peptide sequence, and the value is protein id list indicating where the peptide is from.
    Returns:
        dict: the key is peptide sequence, and the value is protein id list indicating where the peptide is from.
    """
    if len(list_of_pept_dicts) == 0:
        raise ValueError('Need to pass at least 1 element.')

    new_pept_dict = list_of_pept_dicts[0]

    for pept_dict in list_of_pept_dicts[1:]:

        for key in pept_dict.keys():
            if key in new_pept_dict:
                for element in pept_dict[key]:
                    new_pept_dict[key].append(element)
            else:
                new_pept_dict[key] = pept_dict[key]

    return new_pept_dict