<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def enhex(d, separator=''):
 """ Convert bytes to their hexadecimal representation, optionally joined by a given separator. Args: d(bytes):
 The data to convert to hexadecimal representation. separator(str):
 The separator to insert between hexadecimal tuples. Returns: str: The hexadecimal representation of ``d``. Examples: '70776e797061636b' '70 77 6e 79 70 61 63 6b' """


    v = binascii.hexlify(d).decode('ascii')
    if separator:
        return separator.join(
            v[i:i+2]
            for i in range(0, len(v), 2)
        )
    else:
        return v