def create_cert_from_identifier_dct(cert_summary_dct_lst):
    """
    Uses a list of certificate_summary_records that are produced by the
    cert_summary_factory and creates a collection of unique certs.  When the
    same cert is found in multiple files, this routine will combine all of
    the locations in different records so that the resulting collection of
    unique certs will include all of the locations they appear.
    """
    cert_from_identifier_dct = dict()
    for cert_summary_dct in cert_summary_dct_lst:
        identifier = cert_summary_dct['serial_number']
        if identifier in cert_from_identifier_dct:
            locations_set = cert_summary_dct['locations']
            cert_from_identifier_dct[identifier]['locations'] = \
                cert_from_identifier_dct[identifier]['locations'].union(
                locations_set)
        else:
            cert_from_identifier_dct[identifier] = cert_summary_dct

    return cert_from_identifier_dct