class PipelineUtil {

    public static Response<Object> latencyHistory(Pipeline pipeline, String event){
        return pipeline.sendCommand(Command.LATENCY, Keyword.HISTORY.raw, SafeEncoder.encode(event));
    }

    public static Response<Object> latencyReset(Pipeline pipeline, String event){
        return pipeline.sendCommand(Command.LATENCY, joinParameters(Keyword.RESET.raw, SafeEncoder.encodeMany(event)));
    }

    public static Response<Object> clusterCountKeysInSlot(Pipeline pipeline, int slot){
        byte[][] args = new byte[2][];
        args[0] = SafeEncoder.encode(Protocol.CLUSTER_COUNTKEYINSLOT);
        args[1] = SafeEncoder.encode(String.valueOf(slot));
        return pipeline.sendCommand(Command.CLUSTER, args);
    }

    public static Response<Object> debug(Pipeline pipeline, DebugParams params){
        return pipeline.sendCommand(Command.DEBUG, params.getCommand());
    }

    public static Response<Object> memoryUsage(Pipeline pipeline, String key){
        return pipeline.sendCommand(Command.MEMORY, Keyword.USAGE.raw, SafeEncoder.encode(key));
    }

    private static byte[][] joinParameters(byte[] first, byte[][] rest) {<FILL_FUNCTION_BODY>}
}

        byte[][] result = new byte[rest.length + 1][];
        result[0] = first;
        System.arraycopy(rest, 0, result, 1, rest.length);
        return result;
    
<no_super_class>