def all_notes_line_up(a_list, b_list):
    """
    Takes two lists of NoteNode objects. These may be NoteList objects.
    Returns 2 lists.
    The first list contains the NoteNode objects in a_list that are unmatched in b_list.
    The second list contains the NoteNode objects in b_list that are unmatched in a_list.
    """
    a_list = [x for x in a_list if not x.is_rest] # copy NoteList to list
    b_list = [x for x in b_list if not x.is_rest] # copy NoteList to list

    # remove matched notes
    for a_note in a_list[:]:
        for b_note in b_list[:]:
            if (a_note.start, a_note.end) == (b_note.start, b_note.end):
                # remove the matched pair from their respective lists
                a_list.remove(a_note)
                b_list.remove(b_note)
                break

    return a_list, b_list