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

# When using m
    
  def consume
    messages.each do |message|
      DT[0] << message.offset
    end

    return unless messages.last.offset > 2 && !@marked

    @marked = true
    DT[:marked] << messages.last.offset
    mark_as_consumed(messages.last)
  end