@classmethod
def with_params(cls, xid, zxid, error, data, offset, client, server):
    """Build a ServerMessage (a reply or event) with the given params, possibly parsing some more.

    This must be overridden by ServerMessage subclasses to offer extra parsing of
    parameters specific to the ServerMessage subclass.

    :param xid: the transaction id associated with this ServerMessage
    :param zxid: the ZooKeeper txn id associated with this ServerMessage
    :param error: if the response has an error
    :param data: the remaining data of the associated data packet
    :param offset: the offset from which the data should be read
    :param client: the ip:port to which this ServerMessage is directed to

    :returns: Returns an instance of the specific ServerMessage subclass.
    :raises DeserializationError: if parsing the ServerMessage fails.
    """
    return cls(xid, zxid, error, '', client, server)
