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: topic.rb
    path of file: ./repos/karafka/lib/karafka/pro/routing/features/expiring
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# This Karafka component is a Pro component under a commercial license.
# This Karafka compone
    
            def expiring(ttl = nil)
              # Those settings are used for validation
              @expiring ||= begin
                config = Config.new(active: !ttl.nil?, ttl: ttl)

                if config.active?
                  factory = ->(*) { Pro::Processing::Filters::Expirer.new(ttl) }
                  filter(factory)
                end