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: shim.rb
    path of file: ./repos/metasploit-framework/lib/msf/core/modules/external
    
    the code of the file until where you have to start completion: # -*- coding: binary -*-

class Msf::Modules::External::Shim
  def self.generate(module_path, framework)
    mod = Msf::Modules::External.new(module_path, framework: framework)
    # first check if meta exists and raise an issue if not, #14281
    # raise instead of returning nil to avoid confusion
  
    
  def self.mod_meta_common(mod, meta = {}, ignore_options: [])
    meta[:path]             = mod.path.dump
    meta[:name]             = mod.meta['name'].dump
    meta[:description]      = mod.meta['description'].dump
    meta[:authors]          = mod.meta['authors'].map(&:dump).join(",\n          ")
    meta[:license]          = mod.meta['license'].nil? ? 'MSF_LICENSE' : mod.meta['license']
    meta[:options]          = mod_meta_common_options(mod, ignore_options: ignore_options)
    meta[:advanced_options] = mod_meta_common_options(mod, ignore_options: ignore_options, advanced: true)
    meta[:capabilities]     = mod.meta['capabilities']
    meta[:notes]            = transform_notes(mod.meta['notes'])

    # Additionally check the 'describe_payload_options' key for backwards compatibility
    meta[:default_options] = (mod.meta['default_options'] || mod.meta['describe_payload_options'] || {})

    meta
  end