code: def save_bookmarks(self, filename, bookmarks):
          
          filename = to_text_string(filename)
          bookmarks = to_text_string(bookmarks)
          filename = osp.normpath(osp.abspath(filename))
          bookmarks = eval(bookmarks)
          save_bookmarks(filename, bookmarks)
docs: Receive bookmark changes and save them.