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: school_calendar_step_activity.rb
    path of file: ./repos/i-diario/app/services/api
    
    the code of the file until where you have to start completion: module Api
  class SchoolCalendarStepActivity < BaseSchoolCalendarStepActivity
    def initialize(unity_id, year, step_number)
      @unity_id = unity_id
      @calendar_step = school_calendar_step(unity_id, year, step_number)
      @step_number = step_number
    end

    def any_activity?
      raise ActiveRecord::RecordNotFound if @calendar_step.nil?

      return true if frequencies_in_step(
        @calendar_step.school_calendar_id,
        @calendar_step.start_at,
        @calendar_step.end_at
      ).by_unity_id(@unity_id).exists?

      return true if Avaliation.by_unity_id(@unity_id)
                               .by_school_calendar_step(@calendar_step.id)
                               .exists?

   
    
    def any_activity?
      raise ActiveRecord::RecordNotFound if @calendar_step.nil?

      return true if frequencies_in_step(
        @calendar_step.school_calendar_id,
        @calendar_step.start_at,
        @calendar_step.end_at
      ).by_unity_id(@unity_id).exists?

      return true if Avaliation.by_unity_id(@unity_id)
                               .by_school_calendar_step(@calendar_step.id)
                               .exists?

      return true if conceptual_exams_in_step(
        @step_number,
        @calendar_step.start_at,
        @calendar_step.end_at
      ).by_unity(@unity_id).exists?

      return true if descriptive_exams_in_step(
        @step_number,
        @calendar_step.start_at,
        @calendar_step.end_at
      ).by_unity_id(@unity_id).exists?

      return true if recoveries_in_step(
        @calendar_step.start_at,
        @calendar_step.end_at
      ).by_unity_id(@unity_id).exists?

      return true if transfer_notes_in_step(
        @calendar_step.start_at,
        @calendar_step.end_at
      ).by_unity_id(@unity_id).exists?

      return true if complementary_exams_in_step(
        @step_number,
        @calendar_step.start_at,
        @calendar_step.end_at
      ).by_unity_id(@unity_id).exists?

      false
    end