<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_value_error_for_parity(value_error: ValueError, call_type: ParityCallType) -> bool: """ For parity failing calls and functions do not return None if the transaction will fail but instead throw a ValueError exception. This function checks the thrown exception to see if it's the correct one and if yes returns True, if not returns False """

    try:
        error_data = json.loads(str(value_error).replace("'", '"'))
    except json.JSONDecodeError:
        return False

    if call_type == ParityCallType.ESTIMATE_GAS:
        code_checks_out = error_data['code'] == -32016
        message_checks_out = 'The execution failed due to an exception' in error_data['message']
    elif call_type == ParityCallType.CALL:
        code_checks_out = error_data['code'] == -32015
        message_checks_out = 'VM execution error' in error_data['message']
    else:
        raise ValueError('Called check_value_error_for_parity() with illegal call type')

    if code_checks_out and message_checks_out:
        return True

    return False