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: emoji.rb
    path of file: ./repos/discourse/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Emoji
  # update this to clear the cache
  EMOJI_VERSION = "12"

  FITZPATRICK_SCALE ||= %w[1f3fb 1f3fc 1f3fd 1f3fe 1f3ff]

  DEFAULT_GROUP ||= "default"

  inclu
    
  def self.[](name)
    name = name.delete_prefix(":").delete_suffix(":")
    is_toned = name.match?(/\A.+:t[1-6]\z/)
    normalized_name = name.gsub(/\A(.+):t[1-6]\z/, '\1')

    found_emoji = nil

    [[global_emoji_cache, :standard], [site_emoji_cache, :custom]].each do |cache, list_key|
      found_emoji =
        cache.defer_get_set(normalized_name) do
          [
            Emoji
              .public_send(list_key)
              .detect { |e| e.name == normalized_name && (!is_toned || (is_toned && e.tonable)) },
          ]
        end[
          0
        ]

      break if found_emoji
    end

    found_emoji
  end

  def self.create_from_db_item(emoji)
    name = emoji["name"]
    return unless group = groups[name]
    filename = emoji["filename"] || name

    Emoji.new.tap do |e|
      e.name = name
      e.tonable = Emoji.tonable_emojis.include?(name)
      e.url = Emoji.url_for(filename)
      e.group = group
      e.search_aliases = search_aliases[name] || []
    end
  end

  def self.url_for(name)
    name = name.delete_prefix(":").delete_suffix(":").gsub(/(.+):t([1-6])/, '\1/\2')
    if SiteSetting.external_emoji_url.blank?
      "#{Discourse.base_path}/images/emoji/#{SiteSetting.emoji_set}/#{name}.png?v=#{EMOJI_VERSION}"
    else
      "#{SiteSetting.external_emoji_url}/#{SiteSetting.emoji_set}/#{name}.png?v=#{EMOJI_VERSION}"
    end
  end