docs: def unescape(s):
      """Unescape ASSUAN message (0xAB <-> '%AB')."""
      s = bytearray(s)
      i = 0
      while i < len(s):
          if s[i] == ord('%'):
              hex_bytes = bytes(s[i+1:i+3])
              value = int(hex_bytes.decode('ascii'), 16)
              s[i:i+3] = [value]
          i += 1
      return bytes(s)