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: exporter.rb
    path of file: ./repos/vets-api/lib/sidekiq/form526_historical_data_exporter
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Sidekiq
  module Form526HistoricalDataExporter
    class Exporter
      def initialize(batch_size, start_id, end_id, data = [])
        @batch_size = batch_size.to_i
        @start_id = start_id
        @end_id = end_id
        @data = data
        @file_name = "#{start_id}_#{end_id}.json"
        @file_path_and_name = "tmp/#{@file_name}"
      end

  
    
      def process!
        all = []
        batches = Form526Submission.select(:id, :created_at, :encrypted_kms_key, :form_json_ciphertext,
                                           :submitted_claim_id).find_in_batches(batch_size: @batch_size,
                                                                                start: @start_id, finish: @end_id)
        batches.each do |batch|
          batch.each do |submission|
            all << get_submission_stats(submission)
          end
        end
        write_to_file(all.to_json)
        upload_to_s3!
      ensure
        Common::FileHelpers.delete_file_if_exists(@file_path_and_name)
      end