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: type_loader.rb
    path of file: ./repos/puppet/lib/puppet/parser
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'find'
require 'forwardable'
require_relative '../../puppet/parser/parser_factory'

class Puppet::Parser::TypeLoader
  extend Forwardable

  class TypeLoaderError < StandardError; end

  # Import manifest files that match a given file glob pattern.
  #
  # @param pattern [String] the file glob to apply when determining which files
  #   to load
  # @param dir [String] base directory to use when the file is not
  #   found in a module
  # @api private
  def import(pattern, dir)
    modname, files = Puppet::Parser::Files.find_manifests_in_modules(pattern, e
    
  def load_files(modname, files)
    @loaded ||= {}
    loaded_asts = []
    files.reject { |file| @loaded[file] }.each do |file|
      # The squelch_parse_errors use case is for parsing for the purpose of searching
      # for information and it should not abort.
      # There is currently one user in indirector/resourcetype/parser
      #
      if Puppet.lookup(:squelch_parse_errors) { false }
        begin
          loaded_asts << parse_file(file)
        rescue => e
          # Resume from errors so that all parseable files may
          # still be parsed. Mark this file as loaded so that
          # it would not be parsed next time (handle it as if
          # it was successfully parsed).
          Puppet.debug { "Unable to parse '#{file}': #{e.message}" }
        end
      else
        loaded_asts << parse_file(file)
      end