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: context_spec.rb
    path of file: ./repos/puppet/spec/unit/pops/lookup
    
    the code of the file until where you have to start completion: require 'spec_helper'
require 'puppet_spec/files'
require 'puppet_spec/compiler'

module Puppet::Pops
module Lookup
desc
    
      def compile_and_get_notices(code, scope_vars = {})
        Puppet[:code] = code
        scope = compiler.topscope
        scope_vars.each_pair { |k,v| scope.setvar(k, v) }
        node.environment.check_for_reparse
        logs = []
        Puppet::Util::Log.with_destination(Puppet::Test::LogCollector.new(logs)) do
          compiler.compile
        end
        logs = logs.select { |log| log.level == :notice }.map { |log| log.message }
        logs
      end