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: select2_course_input.rb
    path of file: ./repos/i-diario/app/inputs
    
    the code of the file until where you have to start completion: class Select2CourseInput < Select2Input

  def input(wrapper_options
    
  def parse_collection
    user = options[:user]

    courses = []

    if user.current_classroom.present?
      courses = [ user.current_classroom.course ]
    elsif user.current_teacher.present?
      courses = user.current_teacher.classrooms.map(&:course).uniq
    elsif user.current_unity.present?
      courses = user.current_unity.classrooms.map(&:course).uniq
    end