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: group_fetcher.rb
    path of file: ./repos/gitlabhq/lib/generators/gitlab/analytics
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  module Analytics
    class GroupFetcher
      class << self
        def group_unknown?(group)
          return false if groups.empty?

          !groups.has_key?(group)
        end

        def stage_text(group)
          groups[group]&.fetch(:stage) || ''
        en
    
        def groups
          return @groups if @groups

          response = Gitlab::HTTP.get('https://gitlab.com/gitlab-com/www-gitlab-com/raw/master/data/stages.yml')
          raise "Unable to load stages.yml" unless response.success?

          data = YAML.safe_load(response.body)

          groups_data = {}

          data['stages'].each do |stage_name, stage_data|
            stage_data['groups'].each_key do |group_name|
              groups_data[group_name] = { stage: stage_name, section: stage_data['section'] }
            end
          end

          @groups = groups_data.sort_by { |key, _value| key }.to_h
        rescue StandardError
          @groups = {}
        end