def _is_duplicate(mut_seq, dup_mut_seqs):
    """Returns `True` if `mut_seq` is a duplicate.

    Args:
        mut_seq (list(:obj:`CubeMutation`)): The :obj:`list` of
            :obj:`CubeMutation`s which is being checked.
        dup_mut_seqs (:obj:`LayeredArray`): All lists of :obj:`CubeMutation`s
            which have been explored thus far.

    Returns:
        bool: True if `mut_seq` is a duplicate, False otherwise.
    """
    for dup_mut_seq in dup_mut_seqs.data:
        layer = len(dup_mut_seq)
        muts_iterator = zip(dup_mut_seq, mut_seq[-layer:])
        if all(duplic_mut == mut for duplic_mut, mut in muts_iterator):
            return True
    return False