code: def _setup_locale(self, locale: str = locales.DEFAULT_LOCALE) -> None:
          
          if not locale:
              locale = locales.DEFAULT_LOCALE
  
          locale = locale.lower()
          if locale not in locales.SUPPORTED_LOCALES:
              raise UnsupportedLocale(locale)
  
          self.locale = locale
docs: Set up locale after pre-check.
  
          :param str locale: Locale
          :raises UnsupportedLocale: When locale is not supported.
          :return: Nothing.