def handle_duplicate_notebook(library_db, notebook_data, name):
    """prompts user to resolve duplicate notebook problem"""
    from src.praxxis.display import display_error
    from src.praxxis.library import list_library
    from src.praxxis.library import library
    from src.praxxis.sqlite import sqlite_notebook
    from src.praxxis.sqlite import sqlite_library
    from src.praxxis.notebook import notebook
    from src.praxxis.display import display_notebook
    from src.praxxis.util import error
    library_list = []
    for element in notebook_data:
        library_list.append(element[2])
    display_error.duplicate_notebook_error(name, library_list)
    selection = display_notebook.get_notebook_selection()
    if selection.isdigit():
        if int(selection) <= len(library_list):
            selection = library_list[int(selection) - 1]
        else:
            raise error.LibraryNotFoundError(selection)
    else:
        sqlite_library.check_library_exists(library_db, selection)
    return sqlite_notebook.get_notebook(library_db, name, selection)[0]
