def set_rule_option(self, rule_name_or_id, option_name, option_value):
option = self._get_option(rule_name_or_id, option_name)<EOL>try:<EOL><INDENT>option.set(option_value)<EOL><DEDENT>except options.RuleOptionError as e:<EOL><INDENT>msg = u"<STR_LIT>"<EOL>raise LintConfigError(msg.format(option_value, rule_name_or_id, option_name, ustr(e)))<EOL><DEDENT>
Attempts to set a given value for a given option for a given rule.
            LintConfigErrors will be raised if the rule or option don't exist or if the value is invalid.