You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pausing_concurrently_spec.rb
    path of file: ./repos/karafka/spec/integrations/pro/consumption/strategies/vp
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# When we invoke pause from multiple VPs, the last one should win

setup_karafka do |config|
  config.concurrency = 10
  config.max_messages = 500
end

DT[:in_progress] = 0

class Consumer < Karafka::BaseConsumer
  def consume
    synchronize { DT[:in_progress] += 1 }

    messages.
    
  def consume
    synchronize { DT[:in_progress] += 1 }

    messages.each { |message| DT[0] << message.offset }

    if DT[:in_progress] > 1
      sleep(5)

      synchronize do
        # This should be overwritten with above, doing that twice to check, that the last one
        # is selected for target pausing
        pause(0, 5_000)
        pause_offset = messages.first.offset + 5
        DT[:pauses] << [pause_offset, Time.now.to_f]
        pause(pause_offset, 5_000)
      end
    end

    sleep(5)

    synchronize { DT[:in_progress] -= 1 }
  end