def enter(self):
        """Update surface maps of commands.

        Such commands are those which work as widgets
        (checkbuttons or radiobuttons).
        """
        ### cache the contents of the screen
        cache_screen_state()

        ### reset variable to keep track of when the
        ### user clicked a top menu to expand it
        self.was_top_menu_expanded = False

        for method in yield_tree_attrs(
            self, "surface_map_updating_routine", "children"
        ):
            method()
Update surface maps of commands.

        Such commands are those which work as widgets
        (checkbuttons or radiobuttons).
        
nodezator/menu/behaviour.py