def merge_lists(*args):
    """Merge an arbitrary number of lists into a single list and dedupe it

    Args:
        *args: Two or more lists

    Returns:
        A deduped merged list of all the provided lists as a single list
    """

    out = {}
    for contacts in filter(None, args):
        for contact in contacts:
            out[contact.value] = contact

    return list(out.values())
Merge an arbitrary number of lists into a single list and dedupe it

    Args:
        *args: Two or more lists

    Returns:
        A deduped merged list of all the provided lists as a single list