@staticmethod<EOL><INDENT>def set(rule, locale):<DEDENT>
if locale == '<STR_LIT>':<EOL><INDENT>locale = '<STR_LIT>'<EOL><DEDENT>if len(locale) > <NUM_LIT:3>:<EOL><INDENT>locale = locale.split("<STR_LIT:_>")[<NUM_LIT:0>]<EOL><DEDENT>if not hasattr(rule, '<STR_LIT>'):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>PluralizationRules._rules[locale] = rule<EOL>
Overrides the default plural rule for a given locale.

@type rule: str
@param rule: Callable

@type locale: str
@param locale: The locale

@raises: ValueError