def METHOD_NAME(self, menu_path):
    def search_in_list(data):
        for item in data:
            if isinstance(item, str) and item != '---':
                yield item
            elif isinstance(item, dict):
                yield from search_in_dict(item)
    def search_in_dict(data):
        for key, value in data.items():
            if key in {'icon_name', 'extra_menu', 'operator', 'custom_menu'}:
                continue
            if isinstance(value, list):
                yield from search_in_list(value)
    def search_node_names(menu):
        for item in menu:
            if isinstance(item, dict):
                yield from search_in_dict(item)
            elif isinstance(item, list):
                yield from search_in_list(item)
    menu = yaml_parser.load(menu_path)
    nodes = set()
    for name in search_node_names(menu):
        nodes.add(name)
    return nodes