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: analyzer_job.rb
    path of file: ./repos/weg-li/app/jobs
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class AnalyzerJob < ApplicationJob
  retry_on EXIFR::MalformedJPEG, attempts: 5, wait: :polynomially
    
  def apply_registrations(notice, registrations, data_set)
    notice.apply_favorites(registrations) if notice.user.from_history?

    if notice.user.from_recognition?
      notice.registration ||= registrations.first
      notice.brand ||= data_set.brands.first
      notice.color ||= data_set.colors.first
    end