docs: def _save_nb(nb_name):
      """
      Attempts to save notebook. If unsuccessful, shows a warning.
      """
      display(Javascript('IPython.notebook.save_checkpoint();'))
      display(Javascript('IPython.notebook.save_notebook();'))
      print('Saving notebook...', end=' ')
  
      if _wait_for_save(nb_name):
          print("Saved '{}'.".format(nb_name))
      else:
          logging.warning(
              "Could not save your notebook (timed out waiting for "
              "IPython save). Make sure your notebook is saved "
              "and export again."
          )