code: def bytes2guid(s):
      
  
      assert isinstance(s, bytes)
  
      u = struct.unpack
      v = []
      v.extend(u("<IHH", s[:8]))
      v.extend(u(">HQ", s[8:10] + b"\x00\x00" + s[10:]))
      return "%08X-%04X-%04X-%04X-%012X" % tuple(v)
docs: Converts a serialized GUID to a text GUID