def get_state_actions(self, state, **kwargs):
        """
        Removes containers that are stopped. Optionally skips persistent containers. Attached containers are skipped
        by default from removal but can optionally be included.

        :param state: Configuration state.
        :type state: dockermap.map.state.ConfigState
        :param kwargs: Additional keyword arguments.
        :return: Actions on the client, map, and configurations.
        :rtype: list[dockermap.map.action.ItemAction]
        """
        config_type = state.config_id.config_type
        if config_type == ItemType.CONTAINER:
            extra_data = kwargs
        else:
            extra_data = None
        if state.base_state == State.PRESENT:
            if ((config_type == ItemType.VOLUME and self.remove_attached) or
                    (config_type == ItemType.CONTAINER and
                     self.remove_persistent or not state.state_flags & StateFlags.PERSISTENT)):
                return [ItemAction(state, Action.REMOVE, extra_data=extra_data)]
            elif config_type == ItemType.NETWORK:
                connected_containers = state.extra_data.get('containers')
                if connected_containers:
                    actions = [ItemAction(state, NetworkUtilAction.DISCONNECT_ALL, {'containers': connected_containers})]
                else:
                    actions = []
                actions.append(ItemAction(state, Action.REMOVE, extra_data=kwargs))
                return actions
Removes containers that are stopped. Optionally skips persistent containers. Attached containers are skipped
        by default from removal but can optionally be included.

        :param state: Configuration state.
        :type state: dockermap.map.state.ConfigState
        :param kwargs: Additional keyword arguments.
        :return: Actions on the client, map, and configurations.
        :rtype: list[dockermap.map.action.ItemAction]