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: grant_edit_job.rb
    path of file: ./repos/hyrax/app/jobs/hyrax
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module Hyrax
  # Grants the user's edit access on the provided FileSet
  class GrantEditJob < ApplicationJob
    include PermissionJobBehavior
   
    
    def perform(file_set_id, user_key, use_valkyrie: Hyrax.config.use_valkyrie?)
      if use_valkyrie
        acl(file_set_id).grant(:edit).to(user(user_key)).save
      else
        file_set = ::FileSet.find(file_set_id)
        file_set.edit_users += [user_key]
        file_set.save!
      end