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: change_depositor_service.rb
    path of file: ./repos/hyrax/app/services/hyrax
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module Hyrax
  class ChangeDepositorService
    # Set the given `user` as the depositor of the given `work`; If
    # `reset` is true, first remove all previous permissions.
    #
    # Used to transf
    
    def self.call(work, user, reset)
      # user_key is nil when there was no `on_behalf_of` in the form
      return work unless user&.user_key
      # Don't transfer to self
      return work if user.user_key == work.depositor

      work = case work
             when ActiveFedora::Base
               call_af(work, user, reset)
             when Valkyrie::Resource
               call_valkyrie(work, user, reset)
             end