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: download_service.rb
    path of file: ./repos/octobox/app/services
    
    the code of the file until where you have to start completion: class DownloadService
  attr_accessor :user

  def initialize(user)
    @user
    
  def process_unread_state(notifications)
    return if notifications.blank?

    existing_notifications = user.notifications.where(github_id: notifications.map(&:id)).select('id, github_id, unread')
    notifications.each do |notification|
      n = existing_notifications.find{|en| en.github_id == notification.id.to_i}
      next unless n
      begin
        n.update_column(:unread, notification['unread']) if n.unread != notification['unread']
      rescue ActiveRecord::RecordNotUnique
        nil
      end
    end