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: event.rb
    path of file: ./repos/violet_rails/app/models/ahoy
    
    the code of the file until where you have to start completion: class Ahoy::Event < ApplicationRecord
  include Ahoy:
    
  def self.visitors_chart_data_for_page_visit_events
    visitors_by_token = self.joins(:visit).group(:visitor_token).size
    recurring_visitors = visitors_by_token.values.count { |v| v > 1 }
    single_time_visitors = visitors_by_token.keys.count - recurring_visitors

    {"Single time visitor" => single_time_visitors, "Recurring visitors" => recurring_visitors  }
  end