def get_hovered_widget(self):
        """Return either the last widget hovered or None."""
        ### get all hovered widgets
        hovered_widgets = self.gather_hovered(self, [])

        ### retrieve the last one
        try:
            hovered = hovered_widgets[-1]

        ### if there isn't a last one, then there's no
        ### hovered widget, so we assign None to the variable
        except IndexError:
            hovered = None

        ### finally return the object stored in hovered
        return hovered
Return either the last widget hovered or None.
nodezator/menu/hover.py