code: def yank_pop(event):
      
      buff = event.current_buffer
      doc_before_paste = buff.document_before_paste
      clipboard = event.cli.clipboard
  
      if doc_before_paste is not None:
          buff.document = doc_before_paste
          clipboard.rotate()
          buff.paste_clipboard_data(
              clipboard.get_data(), paste_mode=PasteMode.EMACS)
docs: Rotate the kill ring, and yank the new top. Only works following yank or
      yank-pop.