<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def modify_key_parity(key):
 """ The prior use of the function is to return the parity-validated key. The incoming key is expected to be hex data binary representation, e.g. b'E7A3C8B1' """

    validated_key = b''
    for byte in key:
        if parityOf(int(byte)) == -1:
            byte_candidate = int(byte) + 1 
            while parityOf(byte_candidate) == -1:
                byte_candidate = divmod(byte_candidate + 1, 256)[1]
            validated_key += bytes([byte_candidate])

        else:
            validated_key += bytes([byte])
    return validated_key