<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _fill_context_menu_with_model_item_actions(self, context_menu: QMenu):
 """ Find all model items that should be available in the context menu and create QActions for each, by using the available logic in popupmenu.PopupMenu. """

        # Get phrase folders to add to main menu
        logger.info("Rebuilding model item actions, adding all items marked for access through the tray icon.")
        folders = [folder for folder in self.config_manager.allFolders if folder.show_in_tray_menu]
        items = [item for item in self.config_manager.allItems if item.show_in_tray_menu]
        # Only extract the QActions, but discard the PopupMenu instance.
        # This is done, because the PopupMenu class is not directly usable as a context menu here.
        menu = popupmenu.PopupMenu(self.app.service, folders, items, False, "AutoKey")
        new_item_actions = menu.actions()
        context_menu.addActions(new_item_actions)
        for action in new_item_actions:  # type: QAction
            # QMenu does not take the ownership when adding QActions, so manually re-parent all actions.
            # This causes the QActions to be destroyed when the context menu is cleared or re-created.
            action.setParent(context_menu)

        if not context_menu.isEmpty():
            # Avoid a stray separator line, if no items are marked for display in the context menu.
            context_menu.addSeparator()