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: importer.rb
    path of file: ./repos/discourse/script/import_scripts/phpbb3
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative "../base"
require_relativ
    
    def import_anonymous_users
      puts "", "creating anonymous users"
      total_count = @database.count_anonymous_users
      importer = @importers.user_importer
      last_username = ""

      batches do |offset|
        rows, last_username = @database.fetch_anonymous_users(last_username)
        break if rows.size < 1

        create_users(rows, total: total_count, offset: offset) do |row|
          begin
            next if user_id_from_imported_user_id(@settings.prefix(row[:post_username]))
            importer.map_anonymous_user(row)
          rescue => e
            log_error("Failed to map anonymous user with ID #{row[:user_id]}", e)
          end
        end
      end