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: sender_is_system_address.rb
    path of file: ./repos/zammad/app/models/channel/filter
    
    the code of the file until where you have to start completion: # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/

module Channel::Filter::SenderIsSystemAddress

  def self.run(_channel, mail, _transaction_params)

    # if attributes already set by header
    return if mail[:'x-zammad-ticket-create-article-sender']
    return if mail[:'x-zammad-article-sender']

    # check if sender address is system
    form = :'raw-from'
    return if mail[form].blank?
    return if mail[:to].blank?

    # in case, set sender
    begin
      return if !mail[form].addrs

      items = mail[form].addrs
      items.each do |item|
        next if !EmailAddress.exists?(email: item.address.downcase)

        mail[:'x-zammad-ti
    
  def self.run(_channel, mail, _transaction_params)

    # if attributes already set by header
    return if mail[:'x-zammad-ticket-create-article-sender']
    return if mail[:'x-zammad-article-sender']

    # check if sender address is system
    form = :'raw-from'
    return if mail[form].blank?
    return if mail[:to].blank?

    # in case, set sender
    begin
      return if !mail[form].addrs

      items = mail[form].addrs
      items.each do |item|
        next if !EmailAddress.exists?(email: item.address.downcase)

        mail[:'x-zammad-ticket-create-article-sender'] = 'Agent'
        mail[:'x-zammad-article-sender']               = 'Agent'
        return true
      end
    rescue => e
      Rails.logger.error "SenderIsSystemAddress: #{e.inspect}"
    end