code: def validate_action(cls, action):
      
      if action not in cls._VALID_ACTIONS:
        raise ValueError('The supplied action must be one of {valid}, given: {given}'
                         .format(valid=cls._VALID_ACTIONS, given=action))
      return action
docs: Verifies the given action is a valid duplicate jar rule action.
  
      :returns: The action if it is valid.
      :raises: ``ValueError`` if the action is invalid.