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: non_critical_error_pause_no_marking_spec.rb
    path of file: ./repos/karafka/spec/integrations/consumption/strategies/default
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Karafka when no marking happens should restart whole batch
    
  def consume
    messages.each do |message|
      DT[:offsets] << message.offset
    end

    # We need more messages to check this and sometimes we get one and then more
    return if messages.count <= 1

    @count ||= 0
    @count += 1

    return unless @count == 1

    DT[:first_in] = messages.first.offset
    DT[:last_in] = messages.last.offset

    raise StandardError
  end