code: def remove_selection(self, sel):
          
          self._selections.remove(sel)
          # <artist>.figure will be unset so we save them first.
          figures = {artist.figure for artist in [sel.annotation] + sel.extras}
          # ValueError is raised if the artist has already been removed.
          with suppress(ValueError):
              sel.annotation.remove()
          for artist in sel.extras:
              with suppress(ValueError):
                  artist.remove()
          for cb in self._callbacks["remove"]:
              cb(sel)
          for figure in figures:
              figure.canvas.draw_idle()
docs: Remove a `Selection`.