def _get_error_code_name(error_code):
    """
    Get the Python exception name given an error code. If the error code
    doesn't end in "Error", the word "Error" will be appended.
    """

    if error_code.endswith("Error"):
        return error_code
    else:
        return error_code + "Error"