code: def set(rule, locale):
          
  
          if locale == 'pt_BR':
              # temporary set a locale for brazilian
              locale = 'xbr'
  
          if len(locale) > 3:
              locale = locale.split("_")[0]
  
          if not hasattr(rule, '__call__'):
              raise ValueError('The given rule can not be called')
  
          PluralizationRules._rules[locale] = rule
docs: Overrides the default plural rule for a given locale.
  
          @type rule: str
          @param rule: Callable
  
          @type locale: str
          @param locale: The locale
  
          @raises: ValueError