def METHOD_NAME(self, menuName, itemType, statusHelp='',
                traverseSpec=None, **kw):
    menu = self._get_menu(menuName)
    if menu is None:
        return
    if itemType == 'separator':
        menu.addSeparator()
        return
    if itemType != 'command' or 'command' not in kw:
        return
    # Wrapper for exception safety. PyMOL would crash if an exception
    # is not caught!
    def wrapper(command=kw['command']):
        try:
            command()
        except BaseException as e:
            from pymol import colorprinting
            colorprinting.print_exc([__file__])
            from pymol.Qt import QtWidgets
            QtWidgets.QMessageBox.critical(None, 'Error', str(e))
    label = kw.get('label', statusHelp)
    menu.addAction(label, wrapper)