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: exam_rule_fetcher.rb
    path of file: ./repos/i-diario/app/services
    
    the code of the file until where you have to start completion: class ExamRuleFetcher
  def initialize(classroom, student)
    @classroom = classroom
    @student = student
  end

  def self.fetch(classroom, student)
    self.new(classroom, student).fetch
  end

  def fetch
    r
    
  def uses_differentiated_exam_rule(student_enrollment_classroom)
    grade_id = student_enrollment_classroom.classrooms_grade.grade_id
    classroom_grade = @classroom.classrooms_grades.find_by(grade_id: grade_id)

    if @student.uses_differentiated_exam_rule
      (classroom_grade.exam_rule.differentiated_exam_rule || classroom_grade.exam_rule)
    else
      classroom_grade.exam_rule
    end