<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _setup_locale(self, locale: str = locales.DEFAULT_LOCALE) -> None: """Set up locale after pre-check. :param str locale: Locale :raises UnsupportedLocale: When locale is not supported. :return: Nothing. """

        if not locale:
            locale = locales.DEFAULT_LOCALE

        locale = locale.lower()
        if locale not in locales.SUPPORTED_LOCALES:
            raise UnsupportedLocale(locale)

        self.locale = locale