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

module N1Loader
  module ActiveRecord
    module Associations
      module Preloader # :nodoc:
        N1LoaderReflection = Struct.new(:name, :loader) do
          def options
            {}
          end
      
    
        def grouped_records(association, records, polymorphic_parent)
          n1_load_records, records = records.partition do |record|
            record.class.respond_to?(:n1_loaders) && record.class.n1_loaders[association]
          end

          hash = n1_load_records.group_by do |record|
            N1LoaderReflection.new(association, record.class.n1_loaders[association])
          end

          hash.merge(super)
        end