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

require "spec_helper"
require "benchmark"
require "benchmark/memory"

RSpec.describe AmsLazyRelationships::Core do
  extend WithArMode
    
  def serialize(serializer)
    ActiveModelSerializers::SerializableResource.new(
      BlogPost.where(id: blog_posts.map(&:id)),
      each_serializer: serializer,
      adapter: :json_api,
      include: includes
    ).as_json.tap do
      BatchLoader::Executor.clear_current
    end
  end