<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GUIDToStr(g):
 """Converts a GUID sequence of bytes into a string. '{AD4F1667-EA75-4124-84D4-641B3B197C65}' """

    try:
        dat = uuid.UUID(bytes_le=bytes(g))
    except:
        dat = uuid.UUID(bytes_le=''.join(map(chr, g)))
    return '{' + str(dat).upper() + '}'