def composite_response(responses)
      result = responses.all?(&:ok?) ? 'OK' : 'ERROR'
      summary = { sent: 0, rejected: 0, unsent: 0 }

      %i[sent rejected unsent].each do |k|
        summary[k] = responses.map { |r| r.response[k] }.inject(:+)
      end

      Wavefront::Response.new(
        { status:   { result: result, message: nil, code: nil },
          response: summary.to_h }.to_json, nil
      )
    end
def composite_response(responses)
      result = responses.all?(&:ok?) ? 'OK' : 'ERROR'
      summary = { sent: 0, rejected: 0, unsent: 0 }

      %i[sent rejected unsent].each do |k|
        summary[k] = responses.map { |r| r.response[k] }.inject(:+)
      end

      Wavefront::Response.new(
        { status:   { result: result, message: nil, code: nil },
          response: summary.to_h }.to_json, nil
      )
    end
Compound the responses of all chunked writes into one. It will
 be 'ok' only if *everything* passed.