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: trim.rb
    path of file: ./repos/pagy/lib/pagy/extras
    
    the code of the file until where you have to start completion: # See the Pagy documentation: https://ddnexus.github.io/pagy/docs/extras/trim
# frozen_string_literal: true

class Pagy # :nodoc:
  DEFAULT[:t
    
    def pagy_link_proc(pagy, link_extra: '')
      link_proc = super(pagy, link_extra:)
      return link_proc unless pagy.vars[:trim_extra]

      lambda do |page, text = pagy.label_for(page), extra = ''|
        link = +link_proc.call(page, text, extra)
        return link unless page.to_s == '1'

        pagy_trim(pagy, link)
      end
    end