def _unpack(self, data):

        if data is None:
            raise IPCError("received data is None")
        try:
            return json.loads(data.decode('utf-8')), True
        except ValueError:
            pass

        try:
            assert len(data) >= HDRLEN
            size = struct.unpack("!L", data[:HDRLEN])[0]
            assert size >= len(data[HDRLEN:])
            return self._unpack_body(data[HDRLEN:HDRLEN + size]), False
        except __HOLE__:
            raise IPCError(
                "error reading reply!"
                " (probably the socket was disconnected)"
            )
dataset/ETHPy150Open qtile/qtile/libqtile/ipc.py/_IPC._unpack