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

# Karafka should allow for usage of custom throttlers per topic

setup_karafka

class Consumer1 < Karafka::BaseConsum
    
  def apply!(messages)
    @applied = false
    @cursor = nil

    i = -1

    messages.delete_if do |message|
      i += 1

      @applied = i > 0

      @cursor = message if @applied && @cursor.nil?

      next true if @applied

      false
    end
  end