code: def _set_selected_action(self, action):
          
          assert action in self._action_sets
  
          if self._selected_action is not None:
              raise ValueError("The action has already been selected.")
          self._selected_action = action
docs: Setter method for the selected_action property.