def METHOD_NAME(message, key):
    """
    Fake the ecCodes key-fetch.
    Fetch key-value from the fake message (dictionary).
    If the key is not present, raise the diagnostic exception.
    """
    if key in message:
        return message[key]
    else:
        raise _mock_eccodes.CodesInternalError