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

module RailsEventStore
  module AsyncHandler
    def self.with_defaults

    
    def self.with(
      event_store: Rails.configuration.event_store,
      event_store_locator: nil,
      serializer: RubyEventStore::Serializers::YAML
    )
      Module.new do
        define_method :perform do |payload|
          event_store = event_store_locator.call if event_store_locator
          super(event_store.deserialize(serializer: serializer, **payload.transform_keys(&:to_sym)))
        end
      end
    end