def group_data(self):
        group_map = {}
        item_groups = self.item.item_groups

        for group in item_groups:
            if group.id in group_map:
                msg = "menu item '%s' has duplicate group '%s'"
                raise ValueError(msg % (self.path, group.id))
            group_map[group.id] = group

        if u'' not in group_map:
            group = ItemGroup()
            group_map[u''] = group
            item_groups.append(group)

        return group_map, item_groups
The group map and list of group items for the node.
dataset/ETHPy150Open nucleic/enaml/enaml/workbench/ui/menu_helper.py/MenuNode.group_data