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

# This code is 
    
    def assert_allocations(count_map, &block)
      trace = AllocationStats.trace(&block)
      total = trace.allocations.all.size
      count = count_map[ruby_version]

      assert_equal count, total, "Expected #{count} allocations, got #{total} allocations"
    end