def METHOD_NAME(self):
    """Display a menu when clicking on the widget."""
    if self.current_language is None:
        return
    menu = self.menu
    language = self.current_language.lower()
    menu.clear()
    text = _(
        "Restart {} Language Server").format(language.capitalize())
    restart_action = create_action(
        self,
        text=text,
        triggered=lambda: self.provider.restart_lsp(language,
                                                    force=True),
    )
    add_actions(menu, [restart_action])
    rect = self.contentsRect()
    os_height = 7 if os.name == 'nt' else 12
    pos = self.mapToGlobal(
        rect.topLeft() + QPoint(-40, -rect.height() - os_height))
    menu.popup(pos)