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: icn_job.rb
    path of file: ./repos/vets-api/modules/va_notify/app/sidekiq/va_notify
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module VANotify
  class IcnJob
    include Sidekiq::Job
    include SentryLogging
    sidekiq_options retry: 14

    def perform(icn, template_id, personalisation = nil, api_key = Settings.vanotify.services.va_gov.api_key)
      notify_client = VaNotify::Service.new(api_key)

      
    
    def perform(icn, template_id, personalisation = nil, api_key = Settings.vanotify.services.va_gov.api_key)
      notify_client = VaNotify::Service.new(api_key)

      notify_client.send_email(
        {
          recipient_identifier: { id_value: icn, id_type: 'ICN' },
          template_id:, personalisation:
        }.compact
      )
    rescue Common::Exceptions::BackendServiceException => e
      if e.status_code == 400
        log_exception_to_sentry(
          e,
          {
            args: { recipient_identifier: { id_value: icn, id_type: 'ICN' },
                    template_id:, personalisation: }
          },
          { error: :va_notify_icn_job }
        )
      else
        raise e
      end