code: def _on_leave(self, event):
          
          if self._toplevel:
              self._toplevel.destroy()
              self._toplevel = None
          if self._id:
              self.master.after_cancel(self._id)
              self._id = None
docs: Callback for the :obj:`<Leave>` event to destroy the Toplevel.