code: def override_locale(self, locale: str = locales.EN,
                          ) -> Generator['BaseDataProvider', None, None]:
          
          try:
              origin_locale = self.locale
              self._override_locale(locale)
              try:
                  yield self
              finally:
                  self._override_locale(origin_locale)
          except AttributeError:
              raise ValueError('«{}» has not locale dependent'.format(
                  self.__class__.__name__))
docs: Context manager which allows overriding current locale.
  
          Temporarily overrides current locale for
          locale-dependent providers.
  
          :param locale: Locale.
          :return: Provider with overridden locale.