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: question_bundle_assignments_controller.rb
    path of file: ./repos/coursemology2/app/controllers/course/assessment
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
class Course::Assessment::QuestionBundleAssignmentsController < Course::Assessment::Controller
  inclu
    
  def past_assignments_hash
    @group_bundles_lookup = @assessment.question_bundles.to_h { |bundle| [bundle.id, bundle.group_id] }
    @assessment.submissions.eager_load(:question_bundle_assignments).to_h do |submission|
      hash = { submission_id: submission.id, nil => [] }
      submission.question_bundle_assignments.each do |qba|
        group = @group_bundles_lookup[qba.bundle_id]
        hash[group].nil? ? hash[group] = qba.bundle_id : hash[nil].append(qba.bundle_id)
      end
      [submission.creator_id, hash]
    end
  end