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: restore.rb
    path of file: ./repos/imap-backup/lib/imap/backup/cli
    
    the code of the file until where you have to start completion: require "thor"

require "imap/backup/account/restore"

    
      def run
        config = load_config(**options)
        case
        when email && !options.key?(:accounts)
          account = account(config, email)
          restore(account, **restore_options)
        when !email && !options.key?(:accounts)
          Logger.logger.info "Calling restore without an EMAIL parameter is deprecated"
          config.accounts.each { |a| restore(a) }
        when email && options.key?(:accounts)
          raise "Missing EMAIL parameter"
        when !email && options.key?(:accounts)
          Logger.logger.info(
            "Calling restore with the --account option is deprecated, " \
            "please pass a single EMAIL parameter"
          )
          requested_accounts(config).each { |a| restore(a) }
        end