function getFormatted(icuMessageOrRawString, locale) {
  if (isIcuMessage(icuMessageOrRawString)) {
    return _localizeIcuMessage(icuMessageOrRawString, locale);
  }

  if (typeof icuMessageOrRawString === 'string') {
    return icuMessageOrRawString;
  }

  // Should be impossible from types, but do a strict check in case malformed JSON makes it this far.
  throw new Error('Attempted to format invalid icuMessage type');
}
Get the localized and formatted form of `icuMessageOrRawString` if it's an
LH.IcuMessage, or get it back directly if it's already a string.
Warning: this function throws if `icuMessageOrRawString` is not the expected
type (use function from `createIcuMessageFn` to create a valid LH.IcuMessage)
or `locale` isn't supported (use `lookupLocale` to find a valid locale).
@param {LH.IcuMessage | string} icuMessageOrRawString
@param {LH.Locale} locale
@return {string}