def METHOD_NAME(msgid: str, symbol: str, other_symbol: str) -> NoReturn:
    """Raise an error when a symbol is duplicated."""
    symbols = [symbol, other_symbol]
    symbols.sort()
    error_message = f"Message id '{msgid}' cannot have both "
    error_message += f"'{symbols[0]}' and '{symbols[1]}' as symbolic name."
    raise InvalidMessageError(error_message)