function _getLocaleMessages(locale) {
  const localeMessages = LOCALE_MESSAGES[locale];
  if (!localeMessages) {
    if (locale === DEFAULT_LOCALE) {
      // If the default locale isn't in LOCALE_MESSAGES, this is likely executing
      // in a bundle. Let the caller use the fallbacks available.
      return {};
    }
    throw new Error(`Unsupported locale '${locale}'`);
  }

  return localeMessages;
}
Returns the locale messages for the given `locale`, if they exist.
Throws if an unsupported locale.

NOTE: If DEFAULT_LOCALE is requested and this is inside a bundle with locale
messages stripped, an empty object will be returned. Default fallbacks will need to handle that case.
@param {LH.Locale} locale
@return {import('./locales').LhlMessages}