<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_menu(self, name):
 """Get the menu with name `name` from the global menu bar. Returns a menu widget. """

        if self.menubar is None:
            raise ValueError("No menu bar configured")
        return self.menubar.get_menu(name)