<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_hex(value):
 """Validate that value has hex format."""

    try:
        binascii.unhexlify(value)
    except Exception:
        raise vol.Invalid(
            '{} is not of hex format'.format(value))
    return value