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

module Gitlab
  module ImportExport
    module Group
      class TreeRestorer
        include Gitlab::Utils::StrongMemoize

        attr_reader :user, :shared, :groups_mapping

        def initialize(user:, shared:, group:)
          @user = user
          @shared = shared
    
        def process_root(group_id)
          group_attributes = GroupAttributes.new(group_id, relation_reader)

          # name and path are not imported on the root group to avoid conflict
          # with existing groups name and/or path.
          group_attributes.delete_attributes('name', 'path')

          if @top_level_group.has_parent?
            group_attributes.attributes['visibility_level'] = sub_group_visibility_level(
              group_attributes.attributes['visibility_level'],
              @top_level_group.parent
            )
          elsif Gitlab::VisibilityLevel.restricted_level?(group_attributes.attributes['visibility_level'])
            group_attributes.delete_attribute('visibility_level')
          end