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: total_monthly_auth_counts.rb
    path of file: ./repos/identity-idp/app/services/db/monthly_sp_auth_count
    
    the code of the file until where you have to start completion: module Db
  module MonthlySpAuthCount
    class TotalMonthlyAuthCounts
      # @return [Array<Hash>]
      def self.call
        # rubocop:disable Layout/LineLength
        oldest = ::SpReturnLog.where.not(returned_at: nil).first&.returned_at&.to_date&.beginning_of_month
        newest = ::SpReturnLog.where.not(r
    
      def self.call
        # rubocop:disable Layout/LineLength
        oldest = ::SpReturnLog.where.not(returned_at: nil).first&.returned_at&.to_date&.beginning_of_month
        newest = ::SpReturnLog.where.not(returned_at: nil).last&.returned_at&.to_date&.end_of_month
        # rubocop:enable Layout/LineLength

        return [] if !oldest || !newest

        Reports::MonthHelper.months(oldest..newest).flat_map do |month_range|
          query_month(month_range)
        end
      end