function assertValidPlaceholderMap(
    mapName, placeholderMap, allPlaceholderNames) {
  for (const placeholderName of Object.keys(placeholderMap)) {
    assert(
        allPlaceholderNames.has(placeholderName),
        '%s: unknown placeholder: "%s"', mapName, placeholderName);
    const placeholderValue = placeholderMap[placeholderName];
    assert(
        typeof placeholderValue == 'string', 'invalid %s value for %s: "%s"',
        mapName, placeholderName, placeholderValue);
  }
}
Throw an exception if the parameters are not valid for a `declareIcuTemplate`
function call.

@param {string} mapName 'example' or 'original_code'
@param {!Object<string>} placeholderMap Map from placeholder names to string
    values
@param {!Set<string>} allPlaceholderNames All known placeholder names