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

class Import::GitlabGroupsController < Applicatio
    
  def closest_allowed_visibility_level
    if group_params[:parent_id].present?
      parent_group = Group.find(group_params[:parent_id])

      Gitlab::VisibilityLevel.closest_allowed_level(parent_group.visibility_level)
    else
      Gitlab::VisibilityLevel::PRIVATE
    end