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: monthly_calendar_events_service.rb
    path of file: ./repos/miru-web/app/services/calendars
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Calendars
  class MonthlyCalendarEventsService < ApplicationService
    attr_reader :calendar_id, :month, :year, :client

    def init
    
      def filter_events(events:, start_time:, end_time:)
        events.select do |item|
          next unless item.start.date_time.present? || item.end.date_time.present?

          item_start_time = item.start.date_time
          item_end_time = item.end.date_time

          (item_start_time >= start_time && item_end_time <= end_time)
        end
      end