Add the notebook_watcher function.