def unique_group_compare(group0, group1, unique_fields):
    """Compare two groups of records according to unique fields
    (e.g., DOI, URL). If any unique fields are shared among groups,
    they match.

    :param group0: First group of records
    :param group1: Second group of records
    :param unique_fields: Keys to unique fields
    :return: boolean: Are any unique fields shared? 
    """
    # Iterate over fields
    for field in unique_fields:
        
        # Get values for each group
        values0 = [record[field] for record in group0 if field in record]
        values1 = [record[field] for record in group1 if field in record]
        
        # Match if intersection is not empty
        if set(values0).intersection(values1):
            return True
    
    # No match
    return False